linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Minchan Kim <minchan.kim@gmail.com>
To: David Rientjes <rientjes@google.com>
Cc: Andrew Morton <akpm@linux-foundation.org>,
	Mel Gorman <mel@csn.ul.ie>, Con Kolivas <kernel@kolivas.org>,
	linux-mm@kvack.org
Subject: Re: [patch] mm: adjust kswapd nice level for high priority page allocators
Date: Wed, 3 Mar 2010 15:25:00 +0900	[thread overview]
Message-ID: <28c262361003022225k420a5e23y2eeee2c4dfdbccc3@mail.gmail.com> (raw)
In-Reply-To: <alpine.DEB.2.00.1003021610530.14687@chino.kir.corp.google.com>

On Wed, Mar 3, 2010 at 9:14 AM, David Rientjes <rientjes@google.com> wrote:
> On Tue, 2 Mar 2010, Minchan Kim wrote:
>
>> > Why do you reset nice value which set by set_kswapd_nice?
>>
>> My point is that you reset nice value(which is boosted at wakeup_kswapd) to 0
>> before calling balance_pgdat. It means kswapd could be rescheduled by nice 0
>> before really reclaim happens by balance_pgdat.
>
> wakeup_kswapd() wakes up kswapd at the finish_wait() point so that it has
> the nice value set by set_kswapd_nice() when it calls balance_pgdat(),
> loops, and then sets it back to the default nice level of 0.

I can't understand your point.

Now kswapd is working following as.

for (; ;) {
  prepare_to_wait();
  if ( ... ) {
    ...
    ...
    schedule() < --- wakeup point
    ...
    set_user_nice(tsk, 0); <-- You reset nice value to zero.
    order = pgdata->kswapd_max_order;
  }
  finish_wait();
  balance_pgdat(); << before entering balance_pgdat, the nice vaule
will be invalidated.
}

As above code, wakeup_kswapd() wakes up kswapd at not finish_wait but
next line of schedule(). So I think nice vaule promoted by
wakeup_kswapd would be invalidated.


-- 
Kind regards,
Minchan Kim

--
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:[~2010-03-03  6:25 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-03-01 10:14 [patch] mm: adjust kswapd nice level for high priority page allocators David Rientjes
2010-03-01 13:52 ` Mel Gorman
2010-03-01 17:56   ` David Rientjes
2010-03-01 18:04     ` Mel Gorman
2010-03-08 23:23       ` David Rientjes
2010-03-02 23:48   ` Andrew Morton
2010-03-01 16:02 ` Minchan Kim
2010-03-02  4:29   ` Minchan Kim
2010-03-03  0:14     ` David Rientjes
2010-03-03  6:25       ` Minchan Kim [this message]

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=28c262361003022225k420a5e23y2eeee2c4dfdbccc3@mail.gmail.com \
    --to=minchan.kim@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=kernel@kolivas.org \
    --cc=linux-mm@kvack.org \
    --cc=mel@csn.ul.ie \
    --cc=rientjes@google.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;
as well as URLs for NNTP newsgroup(s).