From: <gregkh@linuxfoundation.org>
To: bart.vanassche@sandisk.com, gregkh@linuxfoundation.org,
hare@suse.com, hch@lst.de, snitzer@redhat.com
Cc: <stable@vger.kernel.org>, <stable-commits@vger.kernel.org>
Subject: Patch "dm mpath: delay requeuing while path initialization is in progress" has been added to the 4.11-stable tree
Date: Mon, 22 May 2017 18:05:30 +0200 [thread overview]
Message-ID: <149546913040122@kroah.com> (raw)
This is a note to let you know that I've just added the patch titled
dm mpath: delay requeuing while path initialization is in progress
to the 4.11-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
The filename of the patch is:
dm-mpath-delay-requeuing-while-path-initialization-is-in-progress.patch
and it can be found in the queue-4.11 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@vger.kernel.org> know about it.
>From c1d7ecf7ca11d0edd3085262c8597203440d056c Mon Sep 17 00:00:00 2001
From: Bart Van Assche <bart.vanassche@sandisk.com>
Date: Thu, 27 Apr 2017 10:11:16 -0700
Subject: dm mpath: delay requeuing while path initialization is in progress
From: Bart Van Assche <bart.vanassche@sandisk.com>
commit c1d7ecf7ca11d0edd3085262c8597203440d056c upstream.
Requeuing a request immediately while path initialization is ongoing
causes high CPU usage, something that is undesired. Hence delay
requeuing while path initialization is in progress.
Signed-off-by: Bart Van Assche <bart.vanassche@sandisk.com>
Reviewed-by: Hannes Reinecke <hare@suse.com>
Cc: Christoph Hellwig <hch@lst.de>
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/md/dm-mpath.c | 10 +++++++---
1 file changed, 7 insertions(+), 3 deletions(-)
--- a/drivers/md/dm-mpath.c
+++ b/drivers/md/dm-mpath.c
@@ -322,13 +322,16 @@ static int __pg_init_all_paths(struct mu
return atomic_read(&m->pg_init_in_progress);
}
-static void pg_init_all_paths(struct multipath *m)
+static int pg_init_all_paths(struct multipath *m)
{
+ int ret;
unsigned long flags;
spin_lock_irqsave(&m->lock, flags);
- __pg_init_all_paths(m);
+ ret = __pg_init_all_paths(m);
spin_unlock_irqrestore(&m->lock, flags);
+
+ return ret;
}
static void __switch_pg(struct multipath *m, struct priority_group *pg)
@@ -503,7 +506,8 @@ static int multipath_clone_and_map(struc
return -EIO; /* Failed */
} else if (test_bit(MPATHF_QUEUE_IO, &m->flags) ||
test_bit(MPATHF_PG_INIT_REQUIRED, &m->flags)) {
- pg_init_all_paths(m);
+ if (pg_init_all_paths(m))
+ return DM_MAPIO_DELAY_REQUEUE;
return DM_MAPIO_REQUEUE;
}
Patches currently in stable-queue which might be from bart.vanassche@sandisk.com are
queue-4.11/dm-mpath-requeue-after-a-small-delay-if-blk_get_request-fails.patch
queue-4.11/dm-mpath-avoid-that-path-removal-can-trigger-an-infinite-loop.patch
queue-4.11/dm-mpath-split-and-rename-activate_path-to-prepare-for-its-expanded-use.patch
queue-4.11/dm-mpath-delay-requeuing-while-path-initialization-is-in-progress.patch
reply other threads:[~2017-05-22 16:06 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=149546913040122@kroah.com \
--to=gregkh@linuxfoundation.org \
--cc=bart.vanassche@sandisk.com \
--cc=hare@suse.com \
--cc=hch@lst.de \
--cc=snitzer@redhat.com \
--cc=stable-commits@vger.kernel.org \
--cc=stable@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).