public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Jens Axboe <axboe@suse.de>
To: Vasily Tarasov <vtaras@sw.ru>
Cc: linux-kernel@vger.kernel.org, Kirill Korotaev <dev@sw.ru>
Subject: Re: CFQ ioprio setting patch
Date: Wed, 14 Jun 2006 07:24:41 +0200	[thread overview]
Message-ID: <20060614052441.GH4420@suse.de> (raw)
In-Reply-To: <44744AC0.3020908@sw.ru>

On Wed, May 24 2006, Vasily Tarasov wrote:
> If you set io-priority of process 1 using sys_ioprio_set system call by 
> another process 2 (like ionice do),
> then cfq_init_prio_data() function sets priority of process 2 (current) 
> on queue of process 1 and clears the flag, that designates change of ioprio.
> So the process  1 will work like with priority of process 2.
> 
> I propose not to call cfq_init_prio_data() on io-priority change, but 
> only mark queue as queue with changed prority.
> Every time when new request comes cfq-scheduler checks for this flag and 
> atomaticaly changes priority of queue to new value.

Your analysis looks correct. However the patch is not -stable material,
I've queued it for inclusion post 2.6.17, thanks. Newer version below
for 2.6.17-rc6. If you have the time, please test that 2.6.17-rc6 has
the same bug and that this patch (which is just a port of yours) does
fix it.

diff --git a/block/cfq-iosched.c b/block/cfq-iosched.c
index 56bec4e..e636b0f 100644
--- a/block/cfq-iosched.c
+++ b/block/cfq-iosched.c
@@ -1400,10 +1400,9 @@ static inline void changed_ioprio(struct
 			}
 		}
 		cfqq = cic->cfqq[SYNC];
-		if (cfqq) {
+		if (cfqq)
 			cfq_mark_cfqq_prio_changed(cfqq);
-			cfq_init_prio_data(cfqq);
-		}
+
 		spin_unlock(cfqd->queue->queue_lock);
 	}
 }

-- 
Jens Axboe


      reply	other threads:[~2006-06-14  5:24 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-05-24 12:00 CFQ ioprio setting patch Vasily Tarasov
2006-06-14  5:24 ` Jens Axboe [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=20060614052441.GH4420@suse.de \
    --to=axboe@suse.de \
    --cc=dev@sw.ru \
    --cc=linux-kernel@vger.kernel.org \
    --cc=vtaras@sw.ru \
    /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