linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Alex Shi <alex.shi@linux.alibaba.com>
To: Alexander Duyck <alexander.duyck@gmail.com>
Cc: Anshuman Khandual <anshuman.khandual@arm.com>,
	Matthew Wilcox <willy@infradead.org>,
	David Hildenbrand <david@redhat.com>,
	Andrew Morton <akpm@linux-foundation.org>,
	Hugh Dickins <hughd@google.com>,
	Alexander Duyck <alexander.h.duyck@linux.intel.com>,
	LKML <linux-kernel@vger.kernel.org>,
	linux-mm <linux-mm@kvack.org>, Vlastimil Babka <vbabka@suse.cz>
Subject: Re: [PATCH v2 2/2] mm/pageblock: remove false sharing in pageblock_flags
Date: Thu, 3 Sep 2020 13:35:34 +0800	[thread overview]
Message-ID: <8a7a698b-1d36-897d-7ef0-75ec022663c1@linux.alibaba.com> (raw)
In-Reply-To: <CAKgT0UdwOiFocPO5GtjeysPGtOPVVp3E507Wedwz69Em=ejqXw@mail.gmail.com>



在 2020/8/31 上午4:32, Alexander Duyck 写道:
>> Right that the different level to fix this problem, but narrow the cmpxchg
>> comparsion is still needed and helpful.
> What I was getting at though is that I am not sure that is the case.
> Normally I believe we are always holding the zone lock when updating
> the migrate type. The skip flag is a one-off operation that could
> easily be addressed by changing the logic to use atomic_and or
> atomic_or for the cases where we are updating single bit flags and
> setting the mask value to all 1's or all 0's. So adding this extra
> complexity which only really applies to the skip bit may not provide
> much value, especially as there are a number of possible paths that
> don't use the skip bit anyway.


Using atomic bit set is only helpful for skip bit. but migrate bits are still
do the false sharing sync large.

And actully, for this issue on cmpxchg, it's cross arch issue which it's better
addressed in kernel. I see much of cmpxchg is using in kernel, but no one mentioned
the shortage on this. On this pointer, this problem should be resovled in kernel.

Thanks
Alex

  reply	other threads:[~2020-09-03  5:35 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-08-19  5:47 [PATCH v2 1/2] mm/pageblock: mitigation cmpxchg false sharing in pageblock flags Alex Shi
2020-08-19  5:47 ` [PATCH v2 2/2] mm/pageblock: remove false sharing in pageblock_flags Alex Shi
2020-08-19  7:57   ` Anshuman Khandual
2020-08-19  8:09     ` Alex Shi
2020-08-19  8:13       ` David Hildenbrand
2020-08-19  8:36         ` Alex Shi
2020-08-19 16:50       ` Alexander Duyck
2020-08-30 10:00         ` Alex Shi
2020-08-30 20:32           ` Alexander Duyck
2020-09-03  5:35             ` Alex Shi [this message]
2020-09-01 17:04       ` Vlastimil Babka
2020-08-19  7:55 ` [PATCH v2 1/2] mm/pageblock: mitigation cmpxchg false sharing in pageblock flags Anshuman Khandual
2020-08-19  8:04   ` David Hildenbrand
2020-08-30 10:08     ` Alex Shi
2020-08-30 10:14   ` Alex Shi
2020-08-30 10:18     ` Matthew Wilcox
2020-08-31  8:40       ` Alex Shi

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=8a7a698b-1d36-897d-7ef0-75ec022663c1@linux.alibaba.com \
    --to=alex.shi@linux.alibaba.com \
    --cc=akpm@linux-foundation.org \
    --cc=alexander.duyck@gmail.com \
    --cc=alexander.h.duyck@linux.intel.com \
    --cc=anshuman.khandual@arm.com \
    --cc=david@redhat.com \
    --cc=hughd@google.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=vbabka@suse.cz \
    --cc=willy@infradead.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;
as well as URLs for NNTP newsgroup(s).