Re: [PATCH v2 2/2] mm/pageblock: remove false sharing in pageblock_flags

2020-09-02 Thread Alex Shi
在 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

Re: [PATCH v2 2/2] mm/pageblock: remove false sharing in pageblock_flags

2020-09-01 Thread Vlastimil Babka
On 8/19/20 10:09 AM, Alex Shi wrote: > > > 在 2020/8/19 下午3:57, Anshuman Khandual 写道: >> >> >> On 08/19/2020 11:17 AM, Alex Shi wrote: >>> Current pageblock_flags is only 4 bits, so it has to share a char size >>> in cmpxchg when get set, the false sharing cause perf drop. >>> >>> If we incrase

Re: [PATCH v2 2/2] mm/pageblock: remove false sharing in pageblock_flags

2020-08-30 Thread Alexander Duyck
On Sun, Aug 30, 2020 at 3:00 AM Alex Shi wrote: > > > > 在 2020/8/20 上午12:50, Alexander Duyck 写道: > > On Wed, Aug 19, 2020 at 1:11 AM Alex Shi wrote: > >> > >> > >> > >> 在 2020/8/19 下午3:57, Anshuman Khandual 写道: > >>> > >>> > >>> On 08/19/2020 11:17 AM, Alex Shi wrote: > Current

Re: [PATCH v2 2/2] mm/pageblock: remove false sharing in pageblock_flags

2020-08-30 Thread Alex Shi
在 2020/8/20 上午12:50, Alexander Duyck 写道: > On Wed, Aug 19, 2020 at 1:11 AM Alex Shi wrote: >> >> >> >> 在 2020/8/19 下午3:57, Anshuman Khandual 写道: >>> >>> >>> On 08/19/2020 11:17 AM, Alex Shi wrote: Current pageblock_flags is only 4 bits, so it has to share a char size in cmpxchg when

Re: [PATCH v2 2/2] mm/pageblock: remove false sharing in pageblock_flags

2020-08-19 Thread Alexander Duyck
On Wed, Aug 19, 2020 at 1:11 AM Alex Shi wrote: > > > > 在 2020/8/19 下午3:57, Anshuman Khandual 写道: > > > > > > On 08/19/2020 11:17 AM, Alex Shi wrote: > >> Current pageblock_flags is only 4 bits, so it has to share a char size > >> in cmpxchg when get set, the false sharing cause perf drop. > >> >

Re: [PATCH v2 2/2] mm/pageblock: remove false sharing in pageblock_flags

2020-08-19 Thread Alex Shi
在 2020/8/19 下午4:13, David Hildenbrand 写道: > On 19.08.20 10:09, Alex Shi wrote: >> >> >> 在 2020/8/19 下午3:57, Anshuman Khandual 写道: >>> >>> >>> On 08/19/2020 11:17 AM, Alex Shi wrote: Current pageblock_flags is only 4 bits, so it has to share a char size in cmpxchg when get set, the

Re: [PATCH v2 2/2] mm/pageblock: remove false sharing in pageblock_flags

2020-08-19 Thread David Hildenbrand
On 19.08.20 10:09, Alex Shi wrote: > > > 在 2020/8/19 下午3:57, Anshuman Khandual 写道: >> >> >> On 08/19/2020 11:17 AM, Alex Shi wrote: >>> Current pageblock_flags is only 4 bits, so it has to share a char size >>> in cmpxchg when get set, the false sharing cause perf drop. >>> >>> If we incrase the

Re: [PATCH v2 2/2] mm/pageblock: remove false sharing in pageblock_flags

2020-08-19 Thread Alex Shi
在 2020/8/19 下午3:57, Anshuman Khandual 写道: > > > On 08/19/2020 11:17 AM, Alex Shi wrote: >> Current pageblock_flags is only 4 bits, so it has to share a char size >> in cmpxchg when get set, the false sharing cause perf drop. >> >> If we incrase the bits up to 8, false sharing would gone in

Re: [PATCH v2 2/2] mm/pageblock: remove false sharing in pageblock_flags

2020-08-19 Thread Anshuman Khandual
On 08/19/2020 11:17 AM, Alex Shi wrote: > Current pageblock_flags is only 4 bits, so it has to share a char size > in cmpxchg when get set, the false sharing cause perf drop. > > If we incrase the bits up to 8, false sharing would gone in cmpxchg. and > the only cost is half char per

[PATCH v2 2/2] mm/pageblock: remove false sharing in pageblock_flags

2020-08-18 Thread Alex Shi
Current pageblock_flags is only 4 bits, so it has to share a char size in cmpxchg when get set, the false sharing cause perf drop. If we incrase the bits up to 8, false sharing would gone in cmpxchg. and the only cost is half char per pageblock, which is half char per 128MB on x86, 4 chars in 1