LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
* trivial clean up to zlc_setup
@ 2008-02-29 6:19 KOSAKI Motohiro
2008-02-29 8:05 ` Andrew Morton
2008-02-29 15:36 ` Paul Jackson
0 siblings, 2 replies; 5+ messages in thread
From: KOSAKI Motohiro @ 2008-02-29 6:19 UTC (permalink / raw)
To: Lee Schermerhorn, Paul Jackson, linux-mm, LKML; +Cc: kosaki.motohiro
Hi
I found very small bug during review mel's 2 zonelist patch series.
this patch is trivial clean up.
jiffies subtraction may cause overflow problem.
it shold be used time_after().
Thanks.
Signed-off-by: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
CC: Lee Schermerhorn <Lee.Schermerhorn@hp.com>
CC: Paul Jackson <pj@sgi.com>
---
mm/page_alloc.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Index: b/mm/page_alloc.c
===================================================================
--- a/mm/page_alloc.c 2008-02-18 17:17:25.000000000 +0900
+++ b/mm/page_alloc.c 2008-02-29 15:17:03.000000000 +0900
@@ -1294,7 +1294,7 @@ static nodemask_t *zlc_setup(struct zone
if (!zlc)
return NULL;
- if (jiffies - zlc->last_full_zap > 1 * HZ) {
+ if (time_after(jiffies, zlc->last_full_zap + HZ)) {
bitmap_zero(zlc->fullzones, MAX_ZONES_PER_ZONELIST);
zlc->last_full_zap = jiffies;
}
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: trivial clean up to zlc_setup
2008-02-29 6:19 trivial clean up to zlc_setup KOSAKI Motohiro
@ 2008-02-29 8:05 ` Andrew Morton
2008-02-29 8:30 ` KOSAKI Motohiro
2008-02-29 15:36 ` Paul Jackson
1 sibling, 1 reply; 5+ messages in thread
From: Andrew Morton @ 2008-02-29 8:05 UTC (permalink / raw)
To: KOSAKI Motohiro; +Cc: Lee Schermerhorn, Paul Jackson, linux-mm, LKML
On Fri, 29 Feb 2008 15:19:39 +0900 KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com> wrote:
> Hi
>
> I found very small bug during review mel's 2 zonelist patch series.
>
> this patch is trivial clean up.
> jiffies subtraction may cause overflow problem.
> it shold be used time_after().
>
> Thanks.
>
>
> Signed-off-by: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
> CC: Lee Schermerhorn <Lee.Schermerhorn@hp.com>
> CC: Paul Jackson <pj@sgi.com>
> ---
> mm/page_alloc.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> Index: b/mm/page_alloc.c
> ===================================================================
> --- a/mm/page_alloc.c 2008-02-18 17:17:25.000000000 +0900
> +++ b/mm/page_alloc.c 2008-02-29 15:17:03.000000000 +0900
> @@ -1294,7 +1294,7 @@ static nodemask_t *zlc_setup(struct zone
> if (!zlc)
> return NULL;
>
> - if (jiffies - zlc->last_full_zap > 1 * HZ) {
> + if (time_after(jiffies, zlc->last_full_zap + HZ)) {
> bitmap_zero(zlc->fullzones, MAX_ZONES_PER_ZONELIST);
> zlc->last_full_zap = jiffies;
> }
That's a mainline bug. Also present in 2.6.24, maybe earlier.
But it's a minor one - we'll fix it up one second later (yes?)
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: trivial clean up to zlc_setup
2008-02-29 8:05 ` Andrew Morton
@ 2008-02-29 8:30 ` KOSAKI Motohiro
2008-02-29 13:31 ` S.Çağlar Onur
0 siblings, 1 reply; 5+ messages in thread
From: KOSAKI Motohiro @ 2008-02-29 8:30 UTC (permalink / raw)
To: Andrew Morton
Cc: kosaki.motohiro, Lee Schermerhorn, Paul Jackson, linux-mm, LKML
> > - if (jiffies - zlc->last_full_zap > 1 * HZ) {
> > + if (time_after(jiffies, zlc->last_full_zap + HZ)) {
> > bitmap_zero(zlc->fullzones, MAX_ZONES_PER_ZONELIST);
> > zlc->last_full_zap = jiffies;
> > }
>
> That's a mainline bug. Also present in 2.6.24, maybe earlier.
> But it's a minor one - we'll fix it up one second later (yes?)
I think so, may be.
Thanks.
-kosaki
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: trivial clean up to zlc_setup
2008-02-29 8:30 ` KOSAKI Motohiro
@ 2008-02-29 13:31 ` S.Çağlar Onur
0 siblings, 0 replies; 5+ messages in thread
From: S.Çağlar Onur @ 2008-02-29 13:31 UTC (permalink / raw)
To: KOSAKI Motohiro
Cc: Andrew Morton, Lee Schermerhorn, Paul Jackson, linux-mm, LKML
[-- Attachment #1: Type: text/plain, Size: 1086 bytes --]
Hi;
29 Şub 2008 Cum tarihinde, KOSAKI Motohiro şunları yazmıştı:
> > > - if (jiffies - zlc->last_full_zap > 1 * HZ) {
> > > + if (time_after(jiffies, zlc->last_full_zap + HZ)) {
> > > bitmap_zero(zlc->fullzones, MAX_ZONES_PER_ZONELIST);
> > > zlc->last_full_zap = jiffies;
> > > }
> >
> > That's a mainline bug. Also present in 2.6.24, maybe earlier.
> > But it's a minor one - we'll fix it up one second later (yes?)
>
> I think so, may be.
Andrew "Use time_* macros" series i sent to LKML on 14 Feb [1] has this chunk also (and by the way this version not includes linux/jiffies.h for time_after macro). Some part of this series already gone into Linus's tree with different subsystems but others not received any review/ack or nack. Will you grab others for -mm or will i resend them?
[1] http://lkml.org/lkml/2008/2/14/195
Cheers
--
S.Çağlar Onur <caglar@pardus.org.tr>
http://cekirdek.pardus.org.tr/~caglar/
Linux is like living in a teepee. No Windows, no Gates and an Apache in house!
[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 189 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: trivial clean up to zlc_setup
2008-02-29 6:19 trivial clean up to zlc_setup KOSAKI Motohiro
2008-02-29 8:05 ` Andrew Morton
@ 2008-02-29 15:36 ` Paul Jackson
1 sibling, 0 replies; 5+ messages in thread
From: Paul Jackson @ 2008-02-29 15:36 UTC (permalink / raw)
To: KOSAKI Motohiro; +Cc: Lee.Schermerhorn, linux-mm, linux-kernel
kosaki-san wrote:
> - if (jiffies - zlc->last_full_zap > 1 * HZ) {
> + if (time_after(jiffies, zlc->last_full_zap + HZ)) {
Nice catch. Thank-you.
--
I won't rest till it's the best ...
Programmer, Linux Scalability
Paul Jackson <pj@sgi.com> 1.940.382.4214
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2008-02-29 15:36 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-02-29 6:19 trivial clean up to zlc_setup KOSAKI Motohiro
2008-02-29 8:05 ` Andrew Morton
2008-02-29 8:30 ` KOSAKI Motohiro
2008-02-29 13:31 ` S.Çağlar Onur
2008-02-29 15:36 ` Paul Jackson
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).