All of lore.kernel.org
 help / color / mirror / Atom feed
From: Con Kolivas <kernel@kolivas.org>
To: linux list <linux-kernel@vger.kernel.org>, Andrew Morton <akpm@osdl.org>
Subject: [PATCH] mm: swap prefetch sched batch
Date: Tue, 9 May 2006 00:07:35 +1000	[thread overview]
Message-ID: <200605090007.35787.kernel@kolivas.org> (raw)

kprefetchd is a latency insensitive ultra low priority task. Set it to
SCHED_BATCH to obtain the benefit of this scheduling policy hint.

Signed-off-by: Con Kolivas <kernel@kolivas.org>

---
 mm/swap_prefetch.c |    3 +++
 1 files changed, 3 insertions(+)

Index: linux-2.6.17-rc3-mm1/mm/swap_prefetch.c
===================================================================
--- linux-2.6.17-rc3-mm1.orig/mm/swap_prefetch.c	2006-05-08 23:56:17.000000000 +1000
+++ linux-2.6.17-rc3-mm1/mm/swap_prefetch.c	2006-05-09 00:00:21.000000000 +1000
@@ -504,6 +504,9 @@ static enum trickle_return trickle_swap(
 
 static int kprefetchd(void *__unused)
 {
+	struct sched_param param = { .sched_priority = 0 };
+
+	sched_setscheduler(current, SCHED_BATCH, &param);
 	set_user_nice(current, 19);
 	/* Set ioprio to lowest if supported by i/o scheduler */
 	sys_ioprio_set(IOPRIO_WHO_PROCESS, 0, IOPRIO_CLASS_IDLE);

-- 
-ck

                 reply	other threads:[~2006-05-08 14:07 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=200605090007.35787.kernel@kolivas.org \
    --to=kernel@kolivas.org \
    --cc=akpm@osdl.org \
    --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.