login
Login
/
Register
Search
Search this site:
Forums
News
Blogs
Features
Site
Home
»
Mailing list archives
»
linux-kernel
»
2010
»
July
»
9
Re: [PATCH v2 1/2] vmscan: don't subtraction of unsined
view
thread
Previous message: [
thread
] [
date
] [
author
]
Next message: [
thread
] [
date
] [
author
]
[view in full thread]
From: Minchan Kim
Subject:
Re: [PATCH v2 1/2] vmscan: don't subtraction of unsined
Date: Thursday, July 8, 2010 - 6:46 pm
On Fri, Jul 9, 2010 at 10:16 AM, KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com> wrote:
quoted text
> >> > @@ -2628,16 +2628,16 @@ static int __zone_reclaim(struct zone *zone, gfp_t gfp_mask, unsigned int order) >> > * take a long time. >> > */ >> > while (shrink_slab(sc.nr_scanned, gfp_mask, order) && >> > - zone_page_state(zone, NR_SLAB_RECLAIMABLE) > >> > - slab_reclaimable - nr_pages) >> > + (zone_page_state(zone, NR_SLAB_RECLAIMABLE) + nr_pages > n)) >> > ; >> > >> > /* >> > * Update nr_reclaimed by the number of slab pages we >> > * reclaimed from this zone. >> > */ >> > - sc.nr_reclaimed += slab_reclaimable - >> > - zone_page_state(zone, NR_SLAB_RECLAIMABLE); >> > + m = zone_page_state(zone, NR_SLAB_RECLAIMABLE); >> > + if (m < n) >> > + sc.nr_reclaimed += n - m; >> >> And it's not a completly trivial objection. Your patch made the above >> code snippet quite a lot harder to read (and hence harder to maintain). > > Initially, I proposed following patch to Christoph. but he prefer n and m. > To be honest, I don't think this naming is big matter. so you prefer following > I'll submit it. > > > > > ===================================================================== > From 397199d69860061eaa5e1aaadac45c46c76b0522 Mon Sep 17 00:00:00 2001 > From: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com> > Date: Wed, 30 Jun 2010 13:35:16 +0900 > Subject: [PATCH] vmscan: don't subtraction of unsined > > 'slab_reclaimable' and 'nr_pages' are unsigned. so, subtraction is > unsafe. > > Signed-off-by: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
Reviewed-by: Minchan Kim <minchan.kim@gmail.com> I like this than n,m. -- Kind regards, Minchan Kim --
unsubscribe notice
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to
majordomo@vger.kernel.org
More majordomo info at
http://vger.kernel.org/majordomo-info.html
Please read the FAQ at
http://www.tux.org/lkml/
Previous message: [
thread
] [
date
] [
author
]
Next message: [
thread
] [
date
] [
author
]
Messages in current thread:
[PATCH v2 1/2] vmscan: don't subtraction of unsined
, KOSAKI Motohiro
, (Thu Jul 8, 12:38 am)
[PATCH v2 2/2] vmscan: shrink_slab() require number of lru ...
, KOSAKI Motohiro
, (Thu Jul 8, 12:40 am)
Re: [PATCH v2 1/2] vmscan: don't subtraction of unsined
, KOSAKI Motohiro
, (Thu Jul 8, 12:41 am)
Re: [PATCH v2 2/2] vmscan: shrink_slab() require number of ...
, Rik van Riel
, (Thu Jul 8, 6:23 am)
Re: [PATCH v2 1/2] vmscan: don't subtraction of unsined
, Christoph Lameter
, (Thu Jul 8, 7:01 am)
Re: [PATCH v2 2/2] vmscan: shrink_slab() require number of ...
, Christoph Lameter
, (Thu Jul 8, 7:04 am)
Re: [PATCH v2 1/2] vmscan: don't subtraction of unsined
, Andrew Morton
, (Thu Jul 8, 1:00 pm)
Re: [PATCH v2 2/2] vmscan: shrink_slab() require number of ...
, Andrew Morton
, (Thu Jul 8, 1:31 pm)
Re: [PATCH v2 2/2] vmscan: shrink_slab() require number of ...
, Christoph Lameter
, (Thu Jul 8, 2:01 pm)
Re: [PATCH v2 2/2] vmscan: shrink_slab() require number of ...
, KOSAKI Motohiro
, (Thu Jul 8, 5:46 pm)
Re: [PATCH v2 1/2] vmscan: don't subtraction of unsined
, KOSAKI Motohiro
, (Thu Jul 8, 6:16 pm)
Re: [PATCH v2 1/2] vmscan: don't subtraction of unsined
, Minchan Kim
, (Thu Jul 8, 6:46 pm)
Re: [PATCH v2 2/2] vmscan: shrink_slab() require number of ...
, KOSAKI Motohiro
, (Fri Jul 9, 1:21 am)
Re: [PATCH v2 2/2] vmscan: shrink_slab() require number of ...
, Minchan Kim
, (Fri Jul 9, 1:36 am)
[PATCH] vmscan: stop meaningless loop iteration when no re ...
, KOSAKI Motohiro
, (Fri Jul 9, 3:13 am)
Re: [PATCH] vmscan: stop meaningless loop iteration when n ...
, Minchan Kim
, (Fri Jul 9, 3:53 am)
Re: [PATCH] vmscan: stop meaningless loop iteration when n ...
, KOSAKI Motohiro
, (Fri Jul 9, 4:04 am)
Re: [PATCH v2 2/2] vmscan: shrink_slab() require number of ...
, Christoph Lameter
, (Fri Jul 9, 6:54 am)
Re: [PATCH] vmscan: stop meaningless loop iteration when n ...
, Christoph Lameter
, (Fri Jul 9, 7:02 am)
Re: [PATCH v2 1/2] vmscan: don't subtraction of unsined
, Andrew Morton
, (Fri Jul 9, 3:28 pm)
Re: [PATCH] vmscan: stop meaningless loop iteration when n ...
, Minchan Kim
, (Sun Jul 11, 3:28 pm)
Re: [PATCH] vmscan: stop meaningless loop iteration when n ...
, KOSAKI Motohiro
, (Mon Jul 12, 9:48 pm)
Re: [PATCH] vmscan: stop meaningless loop iteration when n ...
, KOSAKI Motohiro
, (Mon Jul 12, 9:59 pm)
Re: [PATCH v2 2/2] vmscan: shrink_slab() require number of ...
, KOSAKI Motohiro
, (Mon Jul 12, 10:41 pm)
Re: [PATCH] vmscan: stop meaningless loop iteration when n ...
, Minchan Kim
, (Mon Jul 12, 11:33 pm)
Re: [PATCH v2 1/2] vmscan: don't subtraction of unsined
, KOSAKI Motohiro
, (Tue Jul 13, 2:32 am)
Re: [PATCH v2 1/2] vmscan: don't subtraction of unsined
, Christoph Lameter
, (Tue Jul 13, 6:50 pm)
Re: [PATCH v2 1/2] vmscan: don't subtraction of unsined
, KOSAKI Motohiro
, (Tue Jul 13, 7:15 pm)
Re: [PATCH v2 2/2] vmscan: shrink_slab() require number of ...
, Andrew Morton
, (Thu Jul 15, 12:15 pm)
Re: [PATCH v2 2/2] vmscan: shrink_slab() require number of ...
, KOSAKI Motohiro
, (Thu Jul 15, 6:39 pm)
Re: [PATCH v2 2/2] vmscan: shrink_slab() require number of ...
, Minchan Kim
, (Thu Jul 15, 6:44 pm)
Navigation