From: Jens Axboe <axboe@suse.de>
To: Linux Kernel <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] Time sliced cfq with basic io priorities
Date: Mon, 13 Dec 2004 14:09:27 +0100 [thread overview]
Message-ID: <20041213130926.GH3033@suse.de> (raw)
In-Reply-To: <20041213125046.GG3033@suse.de>
[-- Attachment #1: Type: text/plain, Size: 323 bytes --]
On Mon, Dec 13 2004, Jens Axboe wrote:
> 2.6.10-rc2-mm4 patch:
So 2.6.10-rc3-mm1 is out I notice, here's a patch for that:
http://www.kernel.org/pub/linux/kernel/people/axboe/patches/v2.6/2.6.10-rc3-mm1/cfq-time-slices-10-2.6.10-rc3-mm1.gz
And an updated ionice.c attached, the syscall numbers changed.
--
Jens Axboe
[-- Attachment #2: ionice.c --]
[-- Type: text/plain, Size: 1154 bytes --]
#include <stdio.h>
#include <stdlib.h>
#include <errno.h>
#include <getopt.h>
#include <unistd.h>
#include <sys/ptrace.h>
#include <asm/unistd.h>
extern int sys_ioprio_set(int);
extern int sys_ioprio_get(void);
#if defined(__i386__)
#define __NR_ioprio_set 294
#define __NR_ioprio_get 295
#elif defined(__ppc__)
#define __NR_ioprio_set 277
#define __NR_ioprio_get 278
#elif defined(__x86_64__)
#define __NR_ioprio_set 254
#define __NR_ioprio_get 255
#elif defined(__ia64__)
#define __NR_ioprio_set 1274
#define __NR_ioprio_get 1275
#else
#error "Unsupported arch"
#endif
_syscall1(int, ioprio_set, int, ioprio);
_syscall0(int, ioprio_get);
int main(int argc, char *argv[])
{
int ioprio = 2, set = 0;
int c;
while ((c = getopt(argc, argv, "+n:")) != EOF) {
switch (c) {
case 'n':
ioprio = strtol(optarg, NULL, 10);
set = 1;
break;
}
}
if (!set) {
int ioprio = ioprio_get();
if (ioprio == -1)
perror("ioprio_get");
else
printf("%d\n", ioprio_get());
} else if (argv[optind]) {
if (ioprio_set(ioprio) == -1) {
perror("ioprio_set");
return 1;
}
execvp(argv[optind], &argv[optind]);
}
return 0;
}
next prev parent reply other threads:[~2004-12-13 13:10 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-12-13 12:50 [PATCH] Time sliced cfq with basic io priorities Jens Axboe
2004-12-13 13:09 ` Jens Axboe [this message]
2004-12-13 17:57 ` Jens Axboe
2004-12-14 13:37 ` Jens Axboe
2004-12-14 21:31 ` Paul E. McKenney
2004-12-15 6:36 ` Jens Axboe
2004-12-15 15:18 ` Paul E. McKenney
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=20041213130926.GH3033@suse.de \
--to=axboe@suse.de \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.