linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@osdl.org>
To: aradorlinux@yahoo.es
Cc: kernel@kolivas.org, miller@techsource.com, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] O10int for interactivity
Date: Wed, 30 Jul 2003 12:34:27 -0700	[thread overview]
Message-ID: <20030730123427.50d128ea.akpm@osdl.org> (raw)
In-Reply-To: <20030730212832.22e065ad.aradorlinux@yahoo.es>

aradorlinux@yahoo.es wrote:
>
> [changing email address; several hosts block mail from *@teleline/terra.es;
> which is good if they're fighting against spam]
> El Wed, 30 Jul 2003 11:36:06 +1000 Con Kolivas <kernel@kolivas.org> escribió:
> 
> > The logic is in the difference between the dynamic and the static priority to 
> > determine if a task is interactive. 
> > current->static_prio - current->prio
> > will give you a number of -5 to +5, with +5 being a good bonus and vice versa.
> > however you need to ensure that the value you are fiddling with in the i/o 
> > scheduler is actually due to the current process[1]
> 
> I think current really is the process submitting the request; at least in the
> same function we've this:
> 
>         if (rq_data_dir(arq->request) == READ
>                         || current->flags&PF_SYNCWRITE)
> 
> Which would be wrong if current isn't the process submitting the request.

`current' is correct for reads and synchronous writes.  It is usually wrong
for normal pagecache writeback.

If we're going to do this sort of thing, the IO priority and any associated
state should be placeed into struct io_context, which is the structure with
which the IO scheduler tracks per-process stuff.

The io_context is constructed just once across teh lifetime of a process,
so we'd need to update it occasionally to pick up dynamic priority shifts,
changes in niceness, etc.  Probably do that inside a read.

I have a vague feeling that co-opting the scheduling priority information
for use as IO priority will end up being a mistake.  It may be best to
treat these things separately from the outset.


  reply	other threads:[~2003-07-30 19:46 UTC|newest]

Thread overview: 34+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-07-27 15:12 [PATCH] O10int for interactivity Con Kolivas
2003-07-27 16:26 ` Wade
2003-07-27 19:15 ` Felipe Alfaro Solana
2003-07-28  7:51 ` Wiktor Wodecki
2003-07-28  7:55   ` Andrew Morton
2003-07-28  8:00     ` Wiktor Wodecki
2003-07-28 17:12     ` Jose Luis Domingo Lopez
2003-07-28 18:08 ` Valdis.Kletnieks
2003-07-28 18:40   ` Andrew Morton
2003-07-28 21:29     ` Wiktor Wodecki
2003-07-28 21:35       ` Andrew Morton
2003-07-31  6:36         ` Nick Piggin
2003-07-31  7:43           ` Con Kolivas
2003-07-31  7:58             ` Nick Piggin
2003-07-31 14:59             ` Jamie Lokier
2003-07-31 15:24               ` Oliver Neukum
2003-07-31 15:40                 ` Jamie Lokier
2003-07-31 22:56                 ` Nick Piggin
2003-08-04 18:51     ` [PATCH] O13int " Felipe Alfaro Solana
2003-08-04 18:58       ` Felipe Alfaro Solana
2003-08-04 21:46         ` Con Kolivas
2003-08-04 22:16           ` Felipe Alfaro Solana
2003-07-29 14:21   ` [PATCH] O10int " Timothy Miller
2003-07-29 14:35     ` Con Kolivas
2003-07-29 15:35       ` Timothy Miller
2003-07-30  1:16       ` Diego Calleja García
2003-07-30  1:36         ` Con Kolivas
2003-07-30 19:28           ` aradorlinux
2003-07-30 19:34             ` Andrew Morton [this message]
2003-07-29 15:28     ` Valdis.Kletnieks
2003-07-29 15:44       ` Timothy Miller
2003-07-29 15:45         ` Valdis.Kletnieks
2003-07-27 19:50 Voluspa
2003-07-28  2:05 Voluspa

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=20030730123427.50d128ea.akpm@osdl.org \
    --to=akpm@osdl.org \
    --cc=aradorlinux@yahoo.es \
    --cc=kernel@kolivas.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=miller@techsource.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).