* [PATCH] trivial: unneeded zero adding to per_cpu_pages->count
@ 2006-02-21 10:15 nkml00
2006-02-21 10:38 ` nkml00
0 siblings, 1 reply; 2+ messages in thread
From: nkml00 @ 2006-02-21 10:15 UTC (permalink / raw)
To: trivial; +Cc: linux-kernel, nkml00
Unneeded addition (of zero). Compiler could optimize this, but "looks" illogical
--- page_alloc.c-orig 2006-02-21 12:03:52.000000000 -0800
+++ page_alloc.c 2006-02-21 12:49:45.000000000 -0800
@@ -774,7 +774,7 @@ again:
pcp = &zone_pcp(zone, cpu)->pcp[cold];
local_irq_save(flags);
if (!pcp->count) {
- pcp->count += rmqueue_bulk(zone, 0,
+ pcp->count = rmqueue_bulk(zone, 0,
pcp->batch, &pcp->list);
if (unlikely(!pcp->count))
goto failed;
Signed-off-by: nkml00 <nkml00@gmail.com>
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] trivial: unneeded zero adding to per_cpu_pages->count
2006-02-21 10:15 [PATCH] trivial: unneeded zero adding to per_cpu_pages->count nkml00
@ 2006-02-21 10:38 ` nkml00
0 siblings, 0 replies; 2+ messages in thread
From: nkml00 @ 2006-02-21 10:38 UTC (permalink / raw)
To: trivial; +Cc: linux-kernel, nkml00
On 2/21/06, nkml00 <nkml00@gmail.com> wrote:
> Unneeded addition (of zero). Compiler could optimize this, but "looks" illogical
>
Sorry, patch was not in patch -p1 format.
--- l1/mm/page_alloc.c-orig 2006-02-21 12:03:52.000000000 -0800
+++ l2/mm/page_alloc.c 2006-02-21 12:49:45.000000000 -0800
@@ -774,7 +774,7 @@ again:
pcp = &zone_pcp(zone, cpu)->pcp[cold];
local_irq_save(flags);
if (!pcp->count) {
- pcp->count += rmqueue_bulk(zone, 0,
+ pcp->count = rmqueue_bulk(zone, 0,
pcp->batch, &pcp->list);
if (unlikely(!pcp->count))
goto failed;
Signed-off-by: nkml00 <nkml00@gmail.com>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2006-02-21 10:38 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-02-21 10:15 [PATCH] trivial: unneeded zero adding to per_cpu_pages->count nkml00
2006-02-21 10:38 ` nkml00
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®