public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Rik van Riel <riel@redhat.com>
To: "\"अभिजित भोपटकर (Abhijit Bhopatkar)\"" <bainonline@gmail.com>
Cc: Linux Kernel list <linux-kernel@vger.kernel.org>,
	Linus Torvalds <torvalds@osdl.org>,
	akpm@osdl.org, jgarzik@pobox.com
Subject: Re: [PATCH] [RFC] Throttle swappiness for interactive tasks
Date: Wed, 18 Apr 2007 16:52:41 -0400	[thread overview]
Message-ID: <46268519.7080702@redhat.com> (raw)
In-Reply-To: <2ff216280704180510w28136a6cw6816f834593aff13@mail.gmail.com>

अभिजित भोपटकर (Abhijit Bhopatkar) wrote:
> The mm structures of interactive tasks are marked and
> the pages belonging to them are never shifted to inactive
> list in lru algorithm. Thus keeping interactive tasks in
> memory as long as possible.
> The interactivity is already determined by schedular so
> we reuse that knowledge to mark the mm structures.

Aside from the obvious question of whether the idea is good,
there are some practical problems with your patch:

1) the mm->interactive flag is never cleared, even if the
    task stops being interactive

2) what if the interactive tasks use up more memory than
    the system has?  Will you OOM kill instead of swapping
    out part of an interactive task?

3) the scheduler can change its idea about which task is
    interactive and which task isn't very rapidly, while
    disk IO is very slow - the scheduler's classification
    may not be useful on swap timescales

4) a currently completely idle task can still be marked
    interactive in the scheduler, even if it has been
    idle for days.  Such a task is an obvious good
    candidate for swapout, isn't it?

-- 
Politics is the struggle between those who want to make their country
the best in the world, and those who believe it already is.  Each group
calls the other unpatriotic.

  parent reply	other threads:[~2007-04-18 20:53 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-04-18 12:10 [PATCH] [RFC] Throttle swappiness for interactive tasks अभिजित भोपटकर (Abhijit Bhopatkar)
2007-04-18 17:04 ` Chris Snook
2007-04-18 20:52 ` Rik van Riel [this message]
     [not found]   ` <2ff216280704182014h6ff2eed3g4301ee8d1bfbed14@mail.gmail.com>
2007-04-19  4:29     ` Rik van Riel
2007-04-19  5:22       ` Abhijit Bhopatkar
2007-04-19  7:07         ` Rik van Riel

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=46268519.7080702@redhat.com \
    --to=riel@redhat.com \
    --cc=akpm@osdl.org \
    --cc=bainonline@gmail.com \
    --cc=jgarzik@pobox.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=torvalds@osdl.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