mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Venkatraman S <svenkatr@ti.com>
To: <linux-kernel@vger.kernel.org>, <linux-mmc@vger.kernel.org>
Cc: <arnd.bergmann@linaro.org>, <cjb@laptop.org>,
	<alex.limberg@sandisk.com>, <ilan.smith@sandisk.com>,
	<lporzio@micron.com>, Alex Lemberg <alex.lemberg@sandisk.com>,
	Venkatraman S <svenkatr@ti.com>
Subject: [RFC PATCH 04/11] block: Expedite DMPG and SWAPIN requests ahead of the queue
Date: Wed, 18 Apr 2012 11:55:25 +0530	[thread overview]
Message-ID: <1334730332-22244-5-git-send-email-svenkatr@ti.com> (raw)
In-Reply-To: <1334730332-22244-1-git-send-email-svenkatr@ti.com>

From: Ilan Smith <ilan.smith@sandisk.com>

When expedite_swapin and expedite_dmpg are set, move the
requests ahead of the queue.

Signed-off-by: Ilan Smith <ilan.smith@sandisk.com>
Signed-off-by: Alex Lemberg <alex.lemberg@sandisk.com>
Signed-off-by: Venkatraman S <svenkatr@ti.com>
---
 block/blk-core.c |   18 ++++++++++++++++++
 1 file changed, 18 insertions(+)

diff --git a/block/blk-core.c b/block/blk-core.c
index 3a78b00..0b54ee9 100644
--- a/block/blk-core.c
+++ b/block/blk-core.c
@@ -1305,6 +1305,12 @@ void init_request_from_bio(struct request *req, struct bio *bio)
 	if (bio->bi_rw & REQ_RAHEAD)
 		req->cmd_flags |= REQ_FAILFAST_MASK;
 
+	if (bio_swapin(bio) && blk_queue_exp_swapin(req->q))
+		req->cmd_flags |= REQ_RW_SWAPIN;
+
+	if (bio_dmpg(bio) && blk_queue_exp_dmpg(req->q))
+		req->cmd_flags |= REQ_RW_DMPG;
+
 	req->errors = 0;
 	req->__sector = bio->bi_sector;
 	req->ioprio = bio_prio(bio);
@@ -1332,6 +1338,18 @@ void blk_queue_bio(struct request_queue *q, struct bio *bio)
 		goto get_rq;
 	}
 
+	if (bio_swapin(bio) && blk_queue_exp_swapin(q)) {
+		spin_lock_irq(q->queue_lock);
+		where = ELEVATOR_INSERT_FRONT;
+		goto get_rq;
+	}
+
+	if (bio_dmpg(bio) && blk_queue_exp_dmpg(q)) {
+		spin_lock_irq(q->queue_lock);
+		where = ELEVATOR_INSERT_FRONT;
+		goto get_rq;
+	}
+
 	/*
 	 * Check if we can merge with the plugged list before grabbing
 	 * any locks.
-- 
1.7.10.rc2


  parent reply	other threads:[~2012-04-18  6:26 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-04-18  6:25 [RFC PATCH 00/11] [FS, MM, block, MMC]: eMMC High Priority Interrupt Feature Venkatraman S
2012-04-18  6:25 ` [RFC PATCH 01/11] fs: Add demand paging markers to filesystem Venkatraman S
2012-04-18  6:25 ` [RFC PATCH 02/11] mm: Add page swapping markers to memory management Venkatraman S
2012-04-18  6:25 ` [RFC PATCH 03/11] block: Add queue attributes to manage dpmg and swapin requests Venkatraman S
2012-04-18  6:25 ` Venkatraman S [this message]
2012-04-18  6:25 ` [RFC PATCH 05/11] mmc: Add BKOPS field offsets Venkatraman S
2012-04-18  6:25 ` [RFC PATCH 06/11] mmc: core: Helper function for finding preemptible command Venkatraman S
2012-04-18  6:25 ` [RFC PATCH 07/11] mmc: core: add preemptibility tracking fields to mmc command Venkatraman S
2012-04-18  6:25 ` [RFC PATCH 08/11] mmc: core: Add MMC abort interface Venkatraman S
2012-04-18  6:25 ` [RFC PATCH 09/11] mmc: block: Detect HPI support in card and host controller Venkatraman S
2012-04-18  6:25 ` [RFC PATCH 10/11] mmc: core: Utility function for mmc preemption sequence Venkatraman S
2012-04-18  6:25 ` [RFC PATCH 11/11] mmc: block: Implement HPI invocation and handling for foreground requests Venkatraman S
2012-05-15 18:24 ` [RFC PATCH 00/11] [FS, MM, block, MMC]: eMMC High Priority Interrupt Feature Konstantin Dorfman

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=1334730332-22244-5-git-send-email-svenkatr@ti.com \
    --to=svenkatr@ti.com \
    --cc=alex.lemberg@sandisk.com \
    --cc=alex.limberg@sandisk.com \
    --cc=arnd.bergmann@linaro.org \
    --cc=cjb@laptop.org \
    --cc=ilan.smith@sandisk.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mmc@vger.kernel.org \
    --cc=lporzio@micron.com \
    /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®