linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
To: Johannes Weiner <hannes@cmpxchg.org>
Cc: MinChan Kim <minchan.kim@gmail.com>,
	Rik van Riel <riel@redhat.com>, "Rafael J. Wysocki" <rjw@sisk.pl>,
	William Lee Irwin III <wli@movementarian.org>,
	Andrew Morton <akpm@linux-foundation.org>,
	linux-kernel@vger.kernel.org, linux-mm@kvack.org
Subject: Re: [PATCH] shrink_all_memory() use sc.nr_reclaimed
Date: Wed, 11 Feb 2009 05:41:21 +0900	[thread overview]
Message-ID: <2f11576a0902101241j5a006e09w46ecdbdb9c77e081@mail.gmail.com> (raw)
In-Reply-To: <20090210162052.GB2371@cmpxchg.org>

>>  {
>>       struct zone *zone;
>> -     unsigned long nr_to_scan, ret = 0;
>> +     unsigned long nr_to_scan;
>>       enum lru_list l;
>
> Basing it on swsusp-clean-up-shrink_all_zones.patch probably makes it
> easier for Andrew to pick it up.

ok, thanks.

>>                       reclaim_state.reclaimed_slab = 0;
>> -                     shrink_slab(nr_pages, sc.gfp_mask, global_lru_pages());
>> -                     ret += reclaim_state.reclaimed_slab;
>> -             } while (ret < nr_pages && reclaim_state.reclaimed_slab > 0);
>> +                     shrink_slab(nr_pages, sc.gfp_mask,
>> +                                 global_lru_pages());
>> +                     sc.nr_reclaimed += reclaim_state.reclaimed_slab;
>> +             } while (sc.nr_reclaimed < nr_pages &&
>> +                      reclaim_state.reclaimed_slab > 0);
>
> :(
>
> Is this really an improvement?  `ret' is better to read than
> `sc.nr_reclaimed'.

I know it's debetable thing.
but I still think code consistency is important than variable name preference.

--
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>

  reply	other threads:[~2009-02-10 20:41 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-02-09 22:24 [RFC] vmscan: initialize sc->nr_reclaimed in do_try_to_free_pages() Johannes Weiner
2009-02-10 10:47 ` MinChan Kim
2009-02-10 11:43   ` KOSAKI Motohiro
2009-02-10 12:03     ` MinChan Kim
2009-02-10 12:06       ` KOSAKI Motohiro
2009-02-10 12:31         ` MinChan Kim
2009-02-10 12:35           ` KOSAKI Motohiro
2009-02-10 12:40             ` MinChan Kim
2009-02-10 12:58               ` [PATCH] vmscan: initialize sc->nr_reclaimed properly take2 KOSAKI Motohiro
2009-02-10 13:00                 ` [PATCH] shrink_all_memory() use sc.nr_reclaimed KOSAKI Motohiro
2009-02-10 16:20                   ` Johannes Weiner
2009-02-10 20:41                     ` KOSAKI Motohiro [this message]
2009-02-11  0:37                       ` MinChan Kim
2009-02-11 11:50                         ` KOSAKI Motohiro
2009-02-11 12:43                           ` MinChan Kim
2009-02-11 12:58                             ` KOSAKI Motohiro
2009-02-11 13:03                               ` KOSAKI Motohiro
2009-02-10 16:09                 ` [PATCH] vmscan: initialize sc->nr_reclaimed properly take2 Johannes Weiner
2009-02-10 22:06                 ` Andrew Morton
2009-02-10 22:15                   ` Johannes Weiner
2009-02-11 10:52                   ` KOSAKI Motohiro
2009-02-10 22:16 ` [RFC] vmscan: initialize sc->nr_reclaimed in do_try_to_free_pages() Andrew Morton

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=2f11576a0902101241j5a006e09w46ecdbdb9c77e081@mail.gmail.com \
    --to=kosaki.motohiro@jp.fujitsu.com \
    --cc=akpm@linux-foundation.org \
    --cc=hannes@cmpxchg.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=minchan.kim@gmail.com \
    --cc=riel@redhat.com \
    --cc=rjw@sisk.pl \
    --cc=wli@movementarian.org \
    /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;
as well as URLs for NNTP newsgroup(s).