public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Vasily Tarasov <vtaras@sw.ru>
To: axboe@suse.de
Cc: linux-kernel@vger.kernel.org, Kirill Korotaev <dev@sw.ru>
Subject: CFQ ioprio setting patch
Date: Wed, 24 May 2006 16:00:00 +0400	[thread overview]
Message-ID: <44744AC0.3020908@sw.ru> (raw)

[-- Attachment #1: Type: text/plain, Size: 588 bytes --]

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.

Small patch is below.

[-- Attachment #2: diff-cfq-ioprio-set-20060529 --]
[-- Type: text/plain, Size: 405 bytes --]

--- linux-2.6.16-026stab012-ioprio/block/cfq-iosched.c.orig	2006-05-29 13:46:20.000000000 +0400
+++ linux-2.6.16-026stab012-ioprio/block/cfq-iosched.c	2006-05-24 15:31:24.000000000 +0400
@@ -1325,7 +1325,6 @@ static inline void changed_ioprio(struct
 
 		spin_lock(cfqd->queue->queue_lock);
 		cfq_mark_cfqq_prio_changed(cfqq);
-		cfq_init_prio_data(cfqq);
 		spin_unlock(cfqd->queue->queue_lock);
 	}
 }

             reply	other threads:[~2006-05-29 11:56 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-05-24 12:00 Vasily Tarasov [this message]
2006-06-14  5:24 ` CFQ ioprio setting patch Jens Axboe

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=44744AC0.3020908@sw.ru \
    --to=vtaras@sw.ru \
    --cc=axboe@suse.de \
    --cc=dev@sw.ru \
    --cc=linux-kernel@vger.kernel.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