mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: FabF <Fabian.Frederick@skynet.be>
To: Andrew Morton <akpm@osdl.org>
Cc: Nick Piggin <nickpiggin@yahoo.com.au>,
	lkml <linux-kernel@vger.kernel.org>
Subject: [PATCH 2.6.6-rc3-mm1] Add maxthinktime to sysfs
Date: Sat, 01 May 2004 00:26:42 +0200	[thread overview]
Message-ID: <1083364002.6303.9.camel@bluerhyme.real3> (raw)

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

Andrew,

	Here's a patch to add the asio maxthinktime to sysfs.
Could you apply ?

Regards,
Fabian

[-- Attachment #2: maxthinktime1.diff --]
[-- Type: text/x-patch, Size: 1936 bytes --]

diff -Naur orig/drivers/block/as-iosched.c edited/drivers/block/as-iosched.c
--- orig/drivers/block/as-iosched.c	2004-04-30 20:10:43.000000000 +0200
+++ edited/drivers/block/as-iosched.c	2004-05-01 00:02:59.000000000 +0200
@@ -65,7 +65,7 @@
  * or doing a lengthy computation. A small penalty can be justified there, and
  * will still catch out those processes that constantly have large thinktimes.
  */
-#define MAX_THINKTIME (HZ/50UL)
+unsigned long maxthinktime=(HZ/50UL);
 
 /* Bits in as_io_context.state */
 enum as_io_states {
@@ -869,7 +869,7 @@
 			if (test_bit(AS_TASK_IORUNNING, &aic->state)
 							&& in_flight == 0) {
 				thinktime = jiffies - aic->last_end_request;
-				thinktime = min(thinktime, MAX_THINKTIME-1);
+				thinktime = min(thinktime, maxthinktime-1);
 			} else
 				thinktime = 0;
 			as_update_thinktime(ad, aic, thinktime);
@@ -1951,6 +1951,7 @@
 {									\
 	return as_var_show(__VAR, (page));			\
 }
+SHOW_FUNCTION(as_maxthinktime_show, maxthinktime);
 SHOW_FUNCTION(as_readexpire_show, ad->fifo_expire[REQ_SYNC]);
 SHOW_FUNCTION(as_writeexpire_show, ad->fifo_expire[REQ_ASYNC]);
 SHOW_FUNCTION(as_anticexpire_show, ad->antic_expire);
@@ -1968,6 +1969,7 @@
 		*(__PTR) = (MAX);					\
 	return ret;							\
 }
+STORE_FUNCTION(as_maxthinktime_store, &maxthinktime, 0, LONG_MAX);
 STORE_FUNCTION(as_readexpire_store, &ad->fifo_expire[REQ_SYNC], 0, INT_MAX);
 STORE_FUNCTION(as_writeexpire_store, &ad->fifo_expire[REQ_ASYNC], 0, INT_MAX);
 STORE_FUNCTION(as_anticexpire_store, &ad->antic_expire, 0, INT_MAX);
@@ -1977,6 +1979,11 @@
 			&ad->batch_expire[REQ_ASYNC], 0, INT_MAX);
 #undef STORE_FUNCTION
 
+static struct as_fs_entry as_maxthinktime = {
+	.attr = {.name = "maxthinktime", .mode = S_IRUGO | S_IWUSR },
+	.show = as_maxthinktime_show,
+	.store = as_maxthinktime_store,
+};
 static struct as_fs_entry as_est_entry = {
 	.attr = {.name = "est_time", .mode = S_IRUGO },
 	.show = as_est_show,

             reply	other threads:[~2004-04-30 22:21 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-04-30 22:26 FabF [this message]
2004-04-30 22:42 ` Andrew Morton
2004-04-30 23:37   ` FabF
2004-04-30 23:34     ` Andrew Morton
2004-05-01  3:41     ` Nick Piggin

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=1083364002.6303.9.camel@bluerhyme.real3 \
    --to=fabian.frederick@skynet.be \
    --cc=akpm@osdl.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=nickpiggin@yahoo.com.au \
    /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

all inboxes | Powered by JetHome®