mirror of
https://git.yoctoproject.org/meta-ti
synced 2026-07-27 06:18:13 +00:00
9bc77dff5f
Regenerate all beaglebone patches and add one vfs tracer patch for powertop Signed-off-by: Koen Kooi <koen@dominion.thruhere.net> Signed-off-by: Denys Dmytriyenko <denys@ti.com>
87 lines
2.3 KiB
Diff
87 lines
2.3 KiB
Diff
From fd0fcfd8f28824587f180ccde95c03fca533ab05 Mon Sep 17 00:00:00 2001
|
|
From: Tao Guo <glorioustao@gmail.com>
|
|
Date: Wed, 13 Jun 2012 21:17:21 +0200
|
|
Subject: [PATCH 02/49] umem: fix up unplugging
|
|
|
|
commit 32587371ad3db2f9d335de10dbd8cffd4fff5669 upstream.
|
|
|
|
Fix a regression introduced by 7eaceaccab5f40 ("block: remove per-queue
|
|
plugging"). In that patch, Jens removed the whole mm_unplug_device()
|
|
function, which used to be the trigger to make umem start to work.
|
|
|
|
We need to implement unplugging to make umem start to work, or I/O will
|
|
never be triggered.
|
|
|
|
Signed-off-by: Tao Guo <Tao.Guo@emc.com>
|
|
Cc: Neil Brown <neilb@suse.de>
|
|
Cc: Jens Axboe <axboe@kernel.dk>
|
|
Cc: Shaohua Li <shli@kernel.org>
|
|
Acked-by: NeilBrown <neilb@suse.de>
|
|
Signed-off-by: Jens Axboe <axboe@kernel.dk>
|
|
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
|
|
---
|
|
drivers/block/umem.c | 40 ++++++++++++++++++++++++++++++++++++++++
|
|
1 file changed, 40 insertions(+)
|
|
|
|
diff --git a/drivers/block/umem.c b/drivers/block/umem.c
|
|
index aa27120..9a72277 100644
|
|
--- a/drivers/block/umem.c
|
|
+++ b/drivers/block/umem.c
|
|
@@ -513,6 +513,44 @@ static void process_page(unsigned long data)
|
|
}
|
|
}
|
|
|
|
+struct mm_plug_cb {
|
|
+ struct blk_plug_cb cb;
|
|
+ struct cardinfo *card;
|
|
+};
|
|
+
|
|
+static void mm_unplug(struct blk_plug_cb *cb)
|
|
+{
|
|
+ struct mm_plug_cb *mmcb = container_of(cb, struct mm_plug_cb, cb);
|
|
+
|
|
+ spin_lock_irq(&mmcb->card->lock);
|
|
+ activate(mmcb->card);
|
|
+ spin_unlock_irq(&mmcb->card->lock);
|
|
+ kfree(mmcb);
|
|
+}
|
|
+
|
|
+static int mm_check_plugged(struct cardinfo *card)
|
|
+{
|
|
+ struct blk_plug *plug = current->plug;
|
|
+ struct mm_plug_cb *mmcb;
|
|
+
|
|
+ if (!plug)
|
|
+ return 0;
|
|
+
|
|
+ list_for_each_entry(mmcb, &plug->cb_list, cb.list) {
|
|
+ if (mmcb->cb.callback == mm_unplug && mmcb->card == card)
|
|
+ return 1;
|
|
+ }
|
|
+ /* Not currently on the callback list */
|
|
+ mmcb = kmalloc(sizeof(*mmcb), GFP_ATOMIC);
|
|
+ if (!mmcb)
|
|
+ return 0;
|
|
+
|
|
+ mmcb->card = card;
|
|
+ mmcb->cb.callback = mm_unplug;
|
|
+ list_add(&mmcb->cb.list, &plug->cb_list);
|
|
+ return 1;
|
|
+}
|
|
+
|
|
static void mm_make_request(struct request_queue *q, struct bio *bio)
|
|
{
|
|
struct cardinfo *card = q->queuedata;
|
|
@@ -523,6 +561,8 @@ static void mm_make_request(struct request_queue *q, struct bio *bio)
|
|
*card->biotail = bio;
|
|
bio->bi_next = NULL;
|
|
card->biotail = &bio->bi_next;
|
|
+ if (bio->bi_rw & REQ_SYNC || !mm_check_plugged(card))
|
|
+ activate(card);
|
|
spin_unlock_irq(&card->lock);
|
|
|
|
return;
|
|
--
|
|
1.7.10
|
|
|