* [patch] slub: fix a code merge error
@ 2011-11-10 8:04 Shaohua Li
2011-11-10 14:44 ` Christoph Lameter
2011-11-10 20:18 ` David Rientjes
0 siblings, 2 replies; 9+ messages in thread
From: Shaohua Li @ 2011-11-10 8:04 UTC (permalink / raw)
To: linux-mm; +Cc: penberg, cl
Looks there is a merge error in the slub tree. DEACTIVATE_TO_TAIL != 1.
And this will cause performance regression.
Signed-off-by: Shaohua Li <shaohua.li@intel.com>
diff --git a/mm/slub.c b/mm/slub.c
index 7d2a996..60e16c4 100644
--- a/mm/slub.c
+++ b/mm/slub.c
@@ -1904,7 +1904,8 @@ static void unfreeze_partials(struct kmem_cache *s)
if (l == M_PARTIAL)
remove_partial(n, page);
else
- add_partial(n, page, 1);
+ add_partial(n, page,
+ DEACTIVATE_TO_TAIL);
l = m;
}
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
^ permalink raw reply related [flat|nested] 9+ messages in thread
* Re: [patch] slub: fix a code merge error
2011-11-10 8:04 [patch] slub: fix a code merge error Shaohua Li
@ 2011-11-10 14:44 ` Christoph Lameter
2011-11-10 20:18 ` David Rientjes
1 sibling, 0 replies; 9+ messages in thread
From: Christoph Lameter @ 2011-11-10 14:44 UTC (permalink / raw)
To: Shaohua Li; +Cc: linux-mm, penberg
On Thu, 10 Nov 2011, Shaohua Li wrote:
> Looks there is a merge error in the slub tree. DEACTIVATE_TO_TAIL != 1.
> And this will cause performance regression.
Thanks.
Acked-by: Christoph Lameter <cl@linux.com>
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [patch] slub: fix a code merge error
2011-11-10 8:04 [patch] slub: fix a code merge error Shaohua Li
2011-11-10 14:44 ` Christoph Lameter
@ 2011-11-10 20:18 ` David Rientjes
2011-11-10 20:30 ` Pekka Enberg
1 sibling, 1 reply; 9+ messages in thread
From: David Rientjes @ 2011-11-10 20:18 UTC (permalink / raw)
To: Shaohua Li; +Cc: linux-mm, penberg, cl
On Thu, 10 Nov 2011, Shaohua Li wrote:
> Looks there is a merge error in the slub tree. DEACTIVATE_TO_TAIL != 1.
> And this will cause performance regression.
>
> Signed-off-by: Shaohua Li <shaohua.li@intel.com>
>
> diff --git a/mm/slub.c b/mm/slub.c
> index 7d2a996..60e16c4 100644
> --- a/mm/slub.c
> +++ b/mm/slub.c
> @@ -1904,7 +1904,8 @@ static void unfreeze_partials(struct kmem_cache *s)
> if (l == M_PARTIAL)
> remove_partial(n, page);
> else
> - add_partial(n, page, 1);
> + add_partial(n, page,
> + DEACTIVATE_TO_TAIL);
>
> l = m;
> }
Acked-by: David Rientjes <rientjes@google.com>
Not sure where the "merge error" is, though, this is how it was proposed
on linux-mm each time the patch was posted. Probably needs a better title
and changelog.
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [patch] slub: fix a code merge error
2011-11-10 20:18 ` David Rientjes
@ 2011-11-10 20:30 ` Pekka Enberg
2011-11-11 0:33 ` Shaohua Li
2011-11-14 1:56 ` alex shi
0 siblings, 2 replies; 9+ messages in thread
From: Pekka Enberg @ 2011-11-10 20:30 UTC (permalink / raw)
To: David Rientjes; +Cc: Shaohua Li, linux-mm, cl
On Thu, Nov 10, 2011 at 10:18 PM, David Rientjes <rientjes@google.com> wrote:
> On Thu, 10 Nov 2011, Shaohua Li wrote:
>
>> Looks there is a merge error in the slub tree. DEACTIVATE_TO_TAIL != 1.
>> And this will cause performance regression.
>>
>> Signed-off-by: Shaohua Li <shaohua.li@intel.com>
>>
>> diff --git a/mm/slub.c b/mm/slub.c
>> index 7d2a996..60e16c4 100644
>> --- a/mm/slub.c
>> +++ b/mm/slub.c
>> @@ -1904,7 +1904,8 @@ static void unfreeze_partials(struct kmem_cache *s)
>> if (l == M_PARTIAL)
>> remove_partial(n, page);
>> else
>> - add_partial(n, page, 1);
>> + add_partial(n, page,
>> + DEACTIVATE_TO_TAIL);
>>
>> l = m;
>> }
>
> Acked-by: David Rientjes <rientjes@google.com>
>
> Not sure where the "merge error" is, though, this is how it was proposed
> on linux-mm each time the patch was posted. Probably needs a better title
> and changelog.
Indeed. Please resend with proper subject and changelog with
Christoph's and David's ACKs included.
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [patch] slub: fix a code merge error
2011-11-10 20:30 ` Pekka Enberg
@ 2011-11-11 0:33 ` Shaohua Li
2011-11-14 1:56 ` alex shi
1 sibling, 0 replies; 9+ messages in thread
From: Shaohua Li @ 2011-11-11 0:33 UTC (permalink / raw)
To: Pekka Enberg; +Cc: David Rientjes, linux-mm, cl@linux-foundation.org
On Fri, 2011-11-11 at 04:30 +0800, Pekka Enberg wrote:
> On Thu, Nov 10, 2011 at 10:18 PM, David Rientjes <rientjes@google.com> wrote:
> > On Thu, 10 Nov 2011, Shaohua Li wrote:
> >
> >> Looks there is a merge error in the slub tree. DEACTIVATE_TO_TAIL != 1.
> >> And this will cause performance regression.
> >>
> >> Signed-off-by: Shaohua Li <shaohua.li@intel.com>
> >>
> >> diff --git a/mm/slub.c b/mm/slub.c
> >> index 7d2a996..60e16c4 100644
> >> --- a/mm/slub.c
> >> +++ b/mm/slub.c
> >> @@ -1904,7 +1904,8 @@ static void unfreeze_partials(struct kmem_cache *s)
> >> if (l == M_PARTIAL)
> >> remove_partial(n, page);
> >> else
> >> - add_partial(n, page, 1);
> >> + add_partial(n, page,
> >> + DEACTIVATE_TO_TAIL);
> >>
> >> l = m;
> >> }
> >
> > Acked-by: David Rientjes <rientjes@google.com>
> >
> > Not sure where the "merge error" is, though, this is how it was proposed
> > on linux-mm each time the patch was posted. Probably needs a better title
> > and changelog.
>
> Indeed. Please resend with proper subject and changelog with
> Christoph's and David's ACKs included.
Subject: slub: use correct parameter to add a page to partial list tail
unfreeze_partials() needs add the page to partial list tail, since such page
hasn't too many free objects. We now explictly use DEACTIVATE_TO_TAIL for this,
while DEACTIVATE_TO_TAIL != 1. This will cause performance regression (eg, more
lock contention in node->list_lock) without below fix.
Signed-off-by: Shaohua Li <shaohua.li@intel.com>
Acked-by: Christoph Lameter <cl@linux.com>
Acked-by: David Rientjes <rientjes@google.com>
diff --git a/mm/slub.c b/mm/slub.c
index 7d2a996..60e16c4 100644
--- a/mm/slub.c
+++ b/mm/slub.c
@@ -1904,7 +1904,8 @@ static void unfreeze_partials(struct kmem_cache *s)
if (l == M_PARTIAL)
remove_partial(n, page);
else
- add_partial(n, page, 1);
+ add_partial(n, page,
+ DEACTIVATE_TO_TAIL);
l = m;
}
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
^ permalink raw reply related [flat|nested] 9+ messages in thread
* Re: [patch] slub: fix a code merge error
2011-11-10 20:30 ` Pekka Enberg
2011-11-11 0:33 ` Shaohua Li
@ 2011-11-14 1:56 ` alex shi
2011-11-14 3:12 ` Shaohua Li
2011-11-15 6:45 ` Pekka Enberg
1 sibling, 2 replies; 9+ messages in thread
From: alex shi @ 2011-11-14 1:56 UTC (permalink / raw)
To: Pekka Enberg; +Cc: David Rientjes, Shaohua Li, linux-mm, cl
>
> Indeed. Please resend with proper subject and changelog with
> Christoph's and David's ACKs included.
Pekka:
SLUB stat attribute was designed for stat accounting only. I checked
the total 24 attributes that used now. All of them used in stat() only
except the DEACTIVATE_TO_HEAD/TAIL.
And in fact, in the most of using scenarios the DEACTIVATE_TO_TAIL
make reader confuse, TO_TAIL is correct but not for DEACTIVATE.
Further more, CL also regretted this after he acked the original
patches for this attribute mis-usages. He said "don't think we want
this patch any more."
http://permalink.gmane.org/gmane.linux.kernel.mm/67653 and want to use
a comment instead of this confusing usage.
https://lkml.org/lkml/2011/8/29/187
So, as to this regression, from my viewpoint, reverting the
DEACTIVATE_TO_TAIL incorrect usage(commit 136333d104) is a better way.
:)
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [patch] slub: fix a code merge error
2011-11-14 1:56 ` alex shi
@ 2011-11-14 3:12 ` Shaohua Li
2011-11-15 6:45 ` Pekka Enberg
1 sibling, 0 replies; 9+ messages in thread
From: Shaohua Li @ 2011-11-14 3:12 UTC (permalink / raw)
To: alex shi; +Cc: Pekka Enberg, David Rientjes, linux-mm, cl@linux-foundation.org
On Mon, 2011-11-14 at 09:56 +0800, alex shi wrote:
> >
> > Indeed. Please resend with proper subject and changelog with
> > Christoph's and David's ACKs included.
>
> Pekka:
>
> SLUB stat attribute was designed for stat accounting only. I checked
> the total 24 attributes that used now. All of them used in stat() only
> except the DEACTIVATE_TO_HEAD/TAIL.
it's an enum, it can be used in any case if proper used.
> And in fact, in the most of using scenarios the DEACTIVATE_TO_TAIL
> make reader confuse, TO_TAIL is correct but not for DEACTIVATE.
please look at the comments where DEACTIVATE_TO_TAIL is defined.
> Further more, CL also regretted this after he acked the original
> patches for this attribute mis-usages. He said "don't think we want
> this patch any more."
> http://permalink.gmane.org/gmane.linux.kernel.mm/67653 and want to use
> a comment instead of this confusing usage.
> https://lkml.org/lkml/2011/8/29/187
>
> So, as to this regression, from my viewpoint, reverting the
> DEACTIVATE_TO_TAIL incorrect usage(commit 136333d104) is a better way.
> :)
using 0/1 is insane and can easily cause problems. Using a name can help
avoid such insane. This is exactly what commit 136333d104 tries to do.
This is a general C programming skill everybody should already know.
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [patch] slub: fix a code merge error
2011-11-14 1:56 ` alex shi
2011-11-14 3:12 ` Shaohua Li
@ 2011-11-15 6:45 ` Pekka Enberg
2011-11-16 23:06 ` David Rientjes
1 sibling, 1 reply; 9+ messages in thread
From: Pekka Enberg @ 2011-11-15 6:45 UTC (permalink / raw)
To: alex shi; +Cc: David Rientjes, Shaohua Li, linux-mm, cl
>> Indeed. Please resend with proper subject and changelog with
>> Christoph's and David's ACKs included.
On Mon, 14 Nov 2011, alex shi wrote:
> SLUB stat attribute was designed for stat accounting only. I checked
> the total 24 attributes that used now. All of them used in stat() only
> except the DEACTIVATE_TO_HEAD/TAIL.
>
> And in fact, in the most of using scenarios the DEACTIVATE_TO_TAIL
> make reader confuse, TO_TAIL is correct but not for DEACTIVATE.
>
> Further more, CL also regretted this after he acked the original
> patches for this attribute mis-usages. He said "don't think we want
> this patch any more."
> http://permalink.gmane.org/gmane.linux.kernel.mm/67653 and want to use
> a comment instead of this confusing usage.
> https://lkml.org/lkml/2011/8/29/187
>
> So, as to this regression, from my viewpoint, reverting the
> DEACTIVATE_TO_TAIL incorrect usage(commit 136333d104) is a better way.
> :)
The enum is fine. I don't see any reason to revert the whole commit if
Shaohua's patch fixes the problem.
Pekka
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [patch] slub: fix a code merge error
2011-11-15 6:45 ` Pekka Enberg
@ 2011-11-16 23:06 ` David Rientjes
0 siblings, 0 replies; 9+ messages in thread
From: David Rientjes @ 2011-11-16 23:06 UTC (permalink / raw)
To: Pekka Enberg; +Cc: alex shi, Shaohua Li, linux-mm, Christoph Lameter
On Tue, 15 Nov 2011, Pekka Enberg wrote:
> > SLUB stat attribute was designed for stat accounting only. I checked
> > the total 24 attributes that used now. All of them used in stat() only
> > except the DEACTIVATE_TO_HEAD/TAIL.
> >
> > And in fact, in the most of using scenarios the DEACTIVATE_TO_TAIL
> > make reader confuse, TO_TAIL is correct but not for DEACTIVATE.
> >
> > Further more, CL also regretted this after he acked the original
> > patches for this attribute mis-usages. He said "don't think we want
> > this patch any more."
> > http://permalink.gmane.org/gmane.linux.kernel.mm/67653 and want to use
> > a comment instead of this confusing usage.
> > https://lkml.org/lkml/2011/8/29/187
> >
> > So, as to this regression, from my viewpoint, reverting the
> > DEACTIVATE_TO_TAIL incorrect usage(commit 136333d104) is a better way.
> > :)
>
> The enum is fine. I don't see any reason to revert the whole commit if
> Shaohua's patch fixes the problem.
>
It's a slight optimization since "tail" can be set in deactivate_slab()
and be passed to add_partial() without doing something like !!tail or
converting it to a boolean as well as using it when calling stat().
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2011-11-16 23:06 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-11-10 8:04 [patch] slub: fix a code merge error Shaohua Li
2011-11-10 14:44 ` Christoph Lameter
2011-11-10 20:18 ` David Rientjes
2011-11-10 20:30 ` Pekka Enberg
2011-11-11 0:33 ` Shaohua Li
2011-11-14 1:56 ` alex shi
2011-11-14 3:12 ` Shaohua Li
2011-11-15 6:45 ` Pekka Enberg
2011-11-16 23:06 ` David Rientjes
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).