From: akpm@linux-foundation.org
To: mm-commits@vger.kernel.org, paulmck@kernel.org, liushixin2@huawei.com
Subject: + mm-vmstat-annotate-data-race-for-zone-free_areanr_free-fix.patch added to -mm tree
Date: Sun, 19 Sep 2021 15:53:32 -0700 [thread overview]
Message-ID: <20210919225332.i522o%akpm@linux-foundation.org> (raw)
The patch titled
Subject: mm-vmstat-annotate-data-race-for-zone-free_areanr_free-fix
has been added to the -mm tree. Its filename is
mm-vmstat-annotate-data-race-for-zone-free_areanr_free-fix.patch
This patch should soon appear at
https://ozlabs.org/~akpm/mmots/broken-out/mm-vmstat-annotate-data-race-for-zone-free_areanr_free-fix.patch
and later at
https://ozlabs.org/~akpm/mmotm/broken-out/mm-vmstat-annotate-data-race-for-zone-free_areanr_free-fix.patch
Before you just go and hit "reply", please:
a) Consider who else should be cc'ed
b) Prefer to cc a suitable mailing list as well
c) Ideally: find the original patch on the mailing list and do a
reply-to-all to that, adding suitable additional cc's
*** Remember to use Documentation/process/submit-checklist.rst when testing your code ***
The -mm tree is included into linux-next and is updated
there every 3-4 working days
------------------------------------------------------
From: Liu Shixin <liushixin2@huawei.com>
Subject: mm-vmstat-annotate-data-race-for-zone-free_areanr_free-fix
add comments
Link: https://lkml.kernel.org/r/20210918084655.2696522-1-liushixin2@huawei.com
Signed-off-by: Liu Shixin <liushixin2@huawei.com>
Cc: "Paul E . McKenney" <paulmck@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---
mm/vmstat.c | 11 ++++++++++-
1 file changed, 10 insertions(+), 1 deletion(-)
--- a/mm/vmstat.c~mm-vmstat-annotate-data-race-for-zone-free_areanr_free-fix
+++ a/mm/vmstat.c
@@ -1070,7 +1070,12 @@ static void fill_contig_page_info(struct
for (order = 0; order < MAX_ORDER; order++) {
unsigned long blocks;
- /* Count number of free blocks */
+ /*
+ * Count number of free blocks.
+ *
+ * Access to nr_free is lockless as nr_free is used only for
+ * diagnostic purposes. Use data_race to avoid KCSAN warning.
+ */
blocks = data_race(zone->free_area[order].nr_free);
info->free_blocks_total += blocks;
@@ -1445,6 +1450,10 @@ static void frag_show_print(struct seq_f
seq_printf(m, "Node %d, zone %8s ", pgdat->node_id, zone->name);
for (order = 0; order < MAX_ORDER; ++order)
+ /*
+ * Access to nr_free is lockless as nr_free is used only for
+ * printing purposes. Use data_race to avoid KCSAN warning.
+ */
seq_printf(m, "%6lu ", data_race(zone->free_area[order].nr_free));
seq_putc(m, '\n');
}
_
Patches currently in -mm which might be from liushixin2@huawei.com are
mm-vmstat-annotate-data-race-for-zone-free_areanr_free.patch
mm-vmstat-annotate-data-race-for-zone-free_areanr_free-fix.patch
reply other threads:[~2021-09-19 22:53 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210919225332.i522o%akpm@linux-foundation.org \
--to=akpm@linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=liushixin2@huawei.com \
--cc=mm-commits@vger.kernel.org \
--cc=paulmck@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox