Message ID | 20231103140119.2306578-3-wangkefeng.wang@huawei.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:8f47:0:b0:403:3b70:6f57 with SMTP id j7csp1056524vqu; Fri, 3 Nov 2023 07:05:09 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGjeLo2xdXoqne6cZNk7hLUWNgudv0kjZPY4EM7UvJPOaqPbmIujduDq2ZaIggaBLUruWGW X-Received: by 2002:a05:6a00:1da8:b0:6c3:3795:dd66 with SMTP id z40-20020a056a001da800b006c33795dd66mr4136790pfw.16.1699020309421; Fri, 03 Nov 2023 07:05:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1699020309; cv=none; d=google.com; s=arc-20160816; b=sw9rysJTcBM7PtcRFesT+EYzIFCq4MbjOb4F5EkE02X5fhNpLXDhzZYb+d7IameIGX usmK1Fq20XIcNmAv1xHw3yRynBxvW5JUwbgchyX2s/XAXm5YYAwLyCIfGgt7h9E2qOJ+ 6B7ixSCpL/TVFT03q4d3+uX97MPP7In3dXTea2kXgikv4tngrZZOLOudTQ1hYZscIzLH wx1CUmBYeHCw3i4X4mspDRKoRAJnUdk/amny7MWp0tMHb36Q/gtDzWFHUDFLDvzobo8S bGLd9XQDf/uoE546xkNmhfLryY7KAjCYkuzsgkvCMXBwKTAyij3s55liIfjFrQ5n/FuS WAWg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=KcfQLTNeQLYbZjj3Vfq0pzF4qAjIfyux433LLT/5H3c=; fh=kUj/5waaepfljbNx30rj2BALdV0u/mUCTaFWThlgquQ=; b=PxVcZpCv+XAc04MEs0lkmqwFu/8F1/LohE1rs93zt+h0tKgohL0LIZQDAHURG5SfuY Yr5M6z7Aq+H8z3n3Req3qKITaRvJjv5BExkSWdZR96fIWriMS1HGXmWQQ+G9IuENVP7O 3PbikLKyCk1kefJI0yx7RXLHEiTJTpvwS77NtSWw7qgCE5Rn7KO886m1Pnu+MG7C6bTy bEVgTdYhQOVFoUd7Ewn33fLgk9wzSwK+RoT31UGXiNT3unPOS3HDJN+X9+Ry7hVD0wTI reUbsrZn8BqrGIN3zhjrfbX69TqQC+NzNhTS+uRyM1JMt9l7rpLRPCDcRNJH3NFyBQPd Disg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Received: from lipwig.vger.email (lipwig.vger.email. [23.128.96.33]) by mx.google.com with ESMTPS id o13-20020a056a0015cd00b006c3398b42f2si1575116pfu.79.2023.11.03.07.05.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 03 Nov 2023 07:05:09 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) client-ip=23.128.96.33; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by lipwig.vger.email (Postfix) with ESMTP id E348C829E90F; Fri, 3 Nov 2023 07:05:01 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at lipwig.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1377790AbjKCODz (ORCPT <rfc822;lhua1029@gmail.com> + 36 others); Fri, 3 Nov 2023 10:03:55 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37138 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233470AbjKCODt (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Fri, 3 Nov 2023 10:03:49 -0400 Received: from szxga03-in.huawei.com (szxga03-in.huawei.com [45.249.212.189]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 48355D56; Fri, 3 Nov 2023 07:03:46 -0700 (PDT) Received: from dggpemm100001.china.huawei.com (unknown [172.30.72.57]) by szxga03-in.huawei.com (SkyGuard) with ESMTP id 4SMMmm5jbnzMmKq; Fri, 3 Nov 2023 21:59:20 +0800 (CST) Received: from localhost.localdomain (10.175.112.125) by dggpemm100001.china.huawei.com (7.185.36.93) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.31; Fri, 3 Nov 2023 22:03:43 +0800 From: Kefeng Wang <wangkefeng.wang@huawei.com> To: Andrew Morton <akpm@linux-foundation.org> CC: <linux-kernel@vger.kernel.org>, <linux-mm@kvack.org>, Matthew Wilcox <willy@infradead.org>, David Hildenbrand <david@redhat.com>, <linux-s390@vger.kernel.org>, Kefeng Wang <wangkefeng.wang@huawei.com> Subject: [PATCH 02/18] uprobes: use mm_counter_file_folio() Date: Fri, 3 Nov 2023 22:01:03 +0800 Message-ID: <20231103140119.2306578-3-wangkefeng.wang@huawei.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20231103140119.2306578-1-wangkefeng.wang@huawei.com> References: <20231103140119.2306578-1-wangkefeng.wang@huawei.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7BIT Content-Type: text/plain; charset=US-ASCII X-Originating-IP: [10.175.112.125] X-ClientProxiedBy: dggems706-chm.china.huawei.com (10.3.19.183) To dggpemm100001.china.huawei.com (7.185.36.93) X-CFilter-Loop: Reflected X-Spam-Status: No, score=-0.8 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lipwig.vger.email Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (lipwig.vger.email [0.0.0.0]); Fri, 03 Nov 2023 07:05:02 -0700 (PDT) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1781551919773901777 X-GMAIL-MSGID: 1781551919773901777 |
Series |
mm: convert to use folio mm counter
|
|
Commit Message
Kefeng Wang
Nov. 3, 2023, 2:01 p.m. UTC
Use mm_counter_file_folio() to save one compound_head() call.
Signed-off-by: Kefeng Wang <wangkefeng.wang@huawei.com>
---
kernel/events/uprobes.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/kernel/events/uprobes.c b/kernel/events/uprobes.c index 435aac1d8c27..e2d3c89cc524 100644 --- a/kernel/events/uprobes.c +++ b/kernel/events/uprobes.c @@ -188,7 +188,7 @@ static int __replace_page(struct vm_area_struct *vma, unsigned long addr, dec_mm_counter(mm, MM_ANONPAGES); if (!folio_test_anon(old_folio)) { - dec_mm_counter(mm, mm_counter_file(old_page)); + dec_mm_counter(mm, mm_counter_file_folio(old_folio)); inc_mm_counter(mm, MM_ANONPAGES); }