From: Christoph Lameter <cl@linux-foundation.org>
To: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
Cc: LKML <linux-kernel@vger.kernel.org>,
linux-mm <linux-mm@kvack.org>,
Andrew Morton <akpm@linux-foundation.org>,
Mel Gorman <mel@csn.ul.ie>, Rik van Riel <riel@redhat.com>,
Minchan Kim <minchan.kim@gmail.com>,
Johannes Weiner <hannes@cmpxchg.org>
Subject: Re: [PATCH 2/2] vmscan: don't subtraction of unsined
Date: Tue, 29 Jun 2010 10:14:35 -0500 (CDT) [thread overview]
Message-ID: <alpine.DEB.2.00.1006280521190.8725@router.home> (raw)
In-Reply-To: <20100628101802.386A.A69D9226@jp.fujitsu.com>
On Mon, 28 Jun 2010, KOSAKI Motohiro wrote:
> It's unsigned. negative mean very big value. so
>
> "zone_page_state(zone, NR_SLAB_RECLAIMABLE) > slab_reclaimable - nr_pages)" will
> be evaluated false.
There were some suggestions on how to address this later in the patch.
> ok, your mysterious 'order' parameter (as pointed [1/2]) almostly prevent this case.
> because passing 'order' makes very heavy slab pressure and it avoid negative occur.
>
> but unnaturall coding style can make confusing to reviewers. ya, it's not
> big issue. but I also don't find no fixing reason.
This is not a coding issue but one of logic. The order parameter is
mysterious to me too. So is the lru_pages logic.
> > The comparison could be a problem here. So
> >
> > zone_page_state(zone, NR_SLAB_RECLAIMABLE) + nr_pages >
> > slab_reclaimable
> >
> > ?
>
> My patch take the same thing. but It avoided two line comparision.
> Do you mean you like this style? (personally, I don't). If so, I'll
> repost this patch.
Yes. I also do not like long cryptic names for local variables.
--
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/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
next prev parent reply other threads:[~2010-06-29 15:15 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-06-25 11:21 [PATCH 1/2] vmscan: shrink_slab() require number of lru_pages, not page order KOSAKI Motohiro
2010-06-25 11:23 ` [PATCH 2/2] vmscan: don't subtraction of unsined KOSAKI Motohiro
2010-06-25 14:17 ` Christoph Lameter
2010-06-28 2:26 ` KOSAKI Motohiro
2010-06-29 15:14 ` Christoph Lameter [this message]
2010-06-25 14:07 ` [PATCH 1/2] vmscan: shrink_slab() require number of lru_pages, not page order Christoph Lameter
2010-06-27 1:03 ` Minchan Kim
2010-06-29 15:19 ` Christoph Lameter
2010-06-28 1:32 ` KOSAKI Motohiro
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=alpine.DEB.2.00.1006280521190.8725@router.home \
--to=cl@linux-foundation.org \
--cc=akpm@linux-foundation.org \
--cc=hannes@cmpxchg.org \
--cc=kosaki.motohiro@jp.fujitsu.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mel@csn.ul.ie \
--cc=minchan.kim@gmail.com \
--cc=riel@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox