From: Andrew Morton <akpm@linux-foundation.org>
To: Jens Axboe <jens.axboe@oracle.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [PATCH 12/13] ll_rw_blk: temporarily enable max_segments tweaking
Date: Thu, 10 May 2007 03:49:26 -0700 [thread overview]
Message-ID: <20070510034926.7ae29119.akpm@linux-foundation.org> (raw)
In-Reply-To: <11787925162730-git-send-email-jens.axboe@oracle.com>
On Thu, 10 May 2007 12:21:54 +0200 Jens Axboe <jens.axboe@oracle.com> wrote:
> Expose this setting for now, so that users can play with enabling
> large commands without defaulting it to on globally.
>
> Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
> ---
> block/ll_rw_blk.c | 22 ++++++++++++++++++++++
> 1 files changed, 22 insertions(+), 0 deletions(-)
>
> diff --git a/block/ll_rw_blk.c b/block/ll_rw_blk.c
> index b01a5f2..cf05396 100644
> --- a/block/ll_rw_blk.c
> +++ b/block/ll_rw_blk.c
> @@ -3930,7 +3930,22 @@ static ssize_t queue_max_hw_sectors_show(struct request_queue *q, char *page)
> return queue_var_show(max_hw_sectors_kb, (page));
> }
>
> +static ssize_t queue_max_segments_show(struct request_queue *q, char *page)
> +{
> + return queue_var_show(q->max_phys_segments, page);
> +}
> +
> +static ssize_t queue_max_segments_store(struct request_queue *q, const char *page, size_t count)
100-col xterm?
> +{
> + unsigned long segments;
> + ssize_t ret = queue_var_store(&segments, page, count);
>
> + spin_lock_irq(q->queue_lock);
> + q->max_phys_segments = segments;
> + spin_unlock_irq(q->queue_lock);
Fishy locking?
> + return ret;
> +}
> static struct queue_sysfs_entry queue_requests_entry = {
> .attr = {.name = "nr_requests", .mode = S_IRUGO | S_IWUSR },
> .show = queue_requests_show,
> @@ -3954,6 +3969,12 @@ static struct queue_sysfs_entry queue_max_hw_sectors_entry = {
> .show = queue_max_hw_sectors_show,
> };
>
> +static struct queue_sysfs_entry queue_max_segments_entry = {
> + .attr = {.name = "max_segments", .mode = S_IRUGO |S_IWUSR },
whitespace went funny.
> + .show = queue_max_segments_show,
> + .store = queue_max_segments_store,
> +};
> +
> static struct queue_sysfs_entry queue_iosched_entry = {
> .attr = {.name = "scheduler", .mode = S_IRUGO | S_IWUSR },
> .show = elv_iosched_show,
> @@ -3965,6 +3986,7 @@ static struct attribute *default_attrs[] = {
> &queue_ra_entry.attr,
> &queue_max_hw_sectors_entry.attr,
> &queue_max_sectors_entry.attr,
> + &queue_max_segments_entry.attr,
> &queue_iosched_entry.attr,
> NULL,
> };
next prev parent reply other threads:[~2007-05-10 10:50 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-05-10 10:21 [PATCH 0/13] Chaining sg lists for bio IO commands v3 Jens Axboe
2007-05-10 10:21 ` [PATCH 1/13] crypto: don't pollute the global namespace with sg_next() Jens Axboe
2007-05-10 10:21 ` [PATCH 2/13] Add sg helpers for iterating over a scatterlist table Jens Axboe
2007-05-10 10:39 ` Andrew Morton
2007-05-10 10:42 ` Jens Axboe
2007-05-10 10:21 ` [PATCH 3/13] libata: convert to using sg helpers Jens Axboe
2007-05-10 10:21 ` [PATCH 4/13] block: " Jens Axboe
2007-05-10 10:21 ` [PATCH 5/13] scsi: " Jens Axboe
2007-05-10 10:21 ` [PATCH 6/13] i386 dma_map_sg: " Jens Axboe
2007-05-10 10:21 ` [PATCH 7/13] i386 sg: add support for chaining scatterlists Jens Axboe
2007-05-10 10:43 ` Andrew Morton
2007-05-10 10:44 ` Jens Axboe
2007-05-10 10:46 ` Jens Axboe
2007-05-10 10:52 ` Andrew Morton
2007-05-10 11:21 ` Jens Axboe
2007-05-10 10:59 ` Benny Halevy
2007-05-10 11:23 ` Jens Axboe
2007-05-10 10:21 ` [PATCH 8/13] x86-64: update iommu/dma mapping functions to sg helpers Jens Axboe
2007-05-10 10:21 ` [PATCH 9/13] [PATCH] x86-64: enable sg chaining Jens Axboe
2007-05-10 10:21 ` [PATCH 10/13] scsi: simplify scsi_free_sgtable() Jens Axboe
2007-05-10 10:21 ` [PATCH 11/13] SCSI: support for allocating large scatterlists Jens Axboe
2007-05-10 10:48 ` Andrew Morton
2007-05-10 10:52 ` Jens Axboe
2007-05-10 12:38 ` Alan Cox
2007-05-10 10:21 ` [PATCH 12/13] ll_rw_blk: temporarily enable max_segments tweaking Jens Axboe
2007-05-10 10:49 ` Andrew Morton [this message]
2007-05-10 11:20 ` Jens Axboe
2007-05-10 10:21 ` [PATCH 13/13] scsi drivers: sg chaining 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=20070510034926.7ae29119.akpm@linux-foundation.org \
--to=akpm@linux-foundation.org \
--cc=jens.axboe@oracle.com \
--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.