Re: [PATCH v2 1/2] mm/pageblock: mitigation cmpxchg false sharing in pageblock flags

2020-08-31 Thread Alex Shi
在 2020/8/30 下午6:18, Matthew Wilcox 写道: > On Sun, Aug 30, 2020 at 06:14:33PM +0800, Alex Shi wrote: >> +++ b/mm/page_alloc.c >> @@ -532,9 +536,18 @@ void set_pfnblock_flags_mask(struct page *page, >> unsigned long flags, >> mask <<= bitidx; >> flags <<= bitidx; >> >> +#ifdef CON

Re: [PATCH v2 1/2] mm/pageblock: mitigation cmpxchg false sharing in pageblock flags

2020-08-30 Thread Matthew Wilcox
On Sun, Aug 30, 2020 at 06:14:33PM +0800, Alex Shi wrote: > +++ b/mm/page_alloc.c > @@ -532,9 +536,18 @@ void set_pfnblock_flags_mask(struct page *page, unsigned > long flags, > mask <<= bitidx; > flags <<= bitidx; > > +#ifdef CONFIG_CPU_V6 > + byte = (unsigned long)READ_ON

Re: [PATCH v2 1/2] mm/pageblock: mitigation cmpxchg false sharing in pageblock flags

2020-08-30 Thread Alex Shi
在 2020/8/19 下午3:55, Anshuman Khandual 写道: > > > On 08/19/2020 11:17 AM, Alex Shi wrote: >> pageblock_flags is used as long, since every pageblock_flags is just 4 >> bits, 'long' size will include 8(32bit machine) or 16 pageblocks' flags, >> that flag setting has to sync in cmpxchg with 7 or 15

Re: [PATCH v2 1/2] mm/pageblock: mitigation cmpxchg false sharing in pageblock flags

2020-08-30 Thread Alex Shi
在 2020/8/19 下午4:04, David Hildenbrand 写道: > On 19.08.20 09:55, Anshuman Khandual wrote: >> >> >> On 08/19/2020 11:17 AM, Alex Shi wrote: >>> pageblock_flags is used as long, since every pageblock_flags is just 4 >>> bits, 'long' size will include 8(32bit machine) or 16 pageblocks' flags, >>> tha

Re: [PATCH v2 1/2] mm/pageblock: mitigation cmpxchg false sharing in pageblock flags

2020-08-19 Thread David Hildenbrand
On 19.08.20 09:55, Anshuman Khandual wrote: > > > On 08/19/2020 11:17 AM, Alex Shi wrote: >> pageblock_flags is used as long, since every pageblock_flags is just 4 >> bits, 'long' size will include 8(32bit machine) or 16 pageblocks' flags, >> that flag setting has to sync in cmpxchg with 7 or 15

Re: [PATCH v2 1/2] mm/pageblock: mitigation cmpxchg false sharing in pageblock flags

2020-08-19 Thread Anshuman Khandual
On 08/19/2020 11:17 AM, Alex Shi wrote: > pageblock_flags is used as long, since every pageblock_flags is just 4 > bits, 'long' size will include 8(32bit machine) or 16 pageblocks' flags, > that flag setting has to sync in cmpxchg with 7 or 15 other pageblock > flags. It would cause long waiting

[PATCH v2 1/2] mm/pageblock: mitigation cmpxchg false sharing in pageblock flags

2020-08-18 Thread Alex Shi
pageblock_flags is used as long, since every pageblock_flags is just 4 bits, 'long' size will include 8(32bit machine) or 16 pageblocks' flags, that flag setting has to sync in cmpxchg with 7 or 15 other pageblock flags. It would cause long waiting for sync. If we could change the pageblock_flags