[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1336054995-22988-5-git-send-email-svenkatr@ti.com>
Date: Thu, 3 May 2012 19:53:03 +0530
From: Venkatraman S <svenkatr@...com>
To: <linux-mmc@...r.kernel.org>, <cjb@...top.org>,
<linux-mm@...ck.org>, <linux-fsdevel@...r.kernel.org>,
<linux-omap@...r.kernel.org>
CC: <linux-kernel@...r.kernel.org>, <arnd.bergmann@...aro.org>,
<alex.lemberg@...disk.com>, <ilan.smith@...disk.com>,
<lporzio@...ron.com>, <rmk+kernel@....linux.org.uk>,
Venkatraman S <svenkatr@...com>
Subject: [PATCH v2 04/16] block: add sysfs attributes for runtime control of dpmg and swapin
sysfs entries for DPMG and SWAPIN requests so that they can
be set/reset from userspace.
Signed-off-by: Venkatraman S <svenkatr@...com>
---
block/blk-sysfs.c | 16 ++++++++++++++++
1 file changed, 16 insertions(+)
diff --git a/block/blk-sysfs.c b/block/blk-sysfs.c
index cf15001..764de9f 100644
--- a/block/blk-sysfs.c
+++ b/block/blk-sysfs.c
@@ -213,6 +213,8 @@ queue_store_##name(struct request_queue *q, const char *page, size_t count) \
}
QUEUE_SYSFS_BIT_FNS(nonrot, NONROT, 1);
+QUEUE_SYSFS_BIT_FNS(expedite_dmpg, EXP_DMPG, 0);
+QUEUE_SYSFS_BIT_FNS(expedite_swapin, EXP_SWAPIN, 0);
QUEUE_SYSFS_BIT_FNS(random, ADD_RANDOM, 0);
QUEUE_SYSFS_BIT_FNS(iostats, IO_STAT, 0);
#undef QUEUE_SYSFS_BIT_FNS
@@ -387,6 +389,18 @@ static struct queue_sysfs_entry queue_random_entry = {
.store = queue_store_random,
};
+static struct queue_sysfs_entry queue_dmpg_entry = {
+ .attr = {.name = "expedite_demandpaging", .mode = S_IRUGO | S_IWUSR },
+ .show = queue_show_expedite_dmpg,
+ .store = queue_store_expedite_dmpg,
+};
+
+static struct queue_sysfs_entry queue_swapin_entry = {
+ .attr = {.name = "expedite_swapping", .mode = S_IRUGO | S_IWUSR },
+ .show = queue_show_expedite_swapin,
+ .store = queue_store_expedite_swapin,
+};
+
static struct attribute *default_attrs[] = {
&queue_requests_entry.attr,
&queue_ra_entry.attr,
@@ -409,6 +423,8 @@ static struct attribute *default_attrs[] = {
&queue_rq_affinity_entry.attr,
&queue_iostats_entry.attr,
&queue_random_entry.attr,
+ &queue_dmpg_entry.attr,
+ &queue_swapin_entry.attr,
NULL,
};
--
1.7.10.rc2
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists