<feed xmlns='http://www.w3.org/2005/Atom'>
<title>talos-op-linux/include/linux/blk-mq.h, branch v4.8.5</title>
<subtitle>Talos™ II Linux sources for OpenPOWER</subtitle>
<id>https://git.raptorcs.com/git/talos-op-linux/atom?h=v4.8.5</id>
<link rel='self' href='https://git.raptorcs.com/git/talos-op-linux/atom?h=v4.8.5'/>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/talos-op-linux/'/>
<updated>2016-07-08T14:38:49+00:00</updated>
<entry>
<title>blk-mq: Introduce blk_mq_reinit_tagset</title>
<updated>2016-07-08T14:38:49+00:00</updated>
<author>
<name>Sagi Grimberg</name>
<email>sagi@grimberg.me</email>
</author>
<published>2016-07-06T12:55:48+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/talos-op-linux/commit/?id=486cf9899e311838b6ab95d19ff87c4da44d6508'/>
<id>urn:sha1:486cf9899e311838b6ab95d19ff87c4da44d6508</id>
<content type='text'>
The new nvme-rdma driver will need to reinitialize all the tags as part of
the error recovery procedure (realloc the tag memory region). Add a helper
in blk-mq for it that can iterate over all requests in a tagset to make
this easier.

Signed-off-by: Sagi Grimberg &lt;sagi@grimberg.me&gt;
Tested-by: Ming Lin &lt;ming.l@ssi.samsung.com&gt;
Reviewed-by: Stephen Bates &lt;Stephen.Bates@pmcs.com&gt;
Signed-off-by: Christoph Hellwig &lt;hch@lst.de&gt;
Reviewed-by: Steve Wise &lt;swise@opengridcomputing.com&gt;
Tested-by: Steve Wise &lt;swise@opengridcomputing.com&gt;
Signed-off-by: Jens Axboe &lt;axboe@fb.com&gt;
</content>
</entry>
<entry>
<title>blk-mq: add blk_mq_alloc_request_hctx</title>
<updated>2016-07-05T17:28:07+00:00</updated>
<author>
<name>Ming Lin</name>
<email>ming.l@ssi.samsung.com</email>
</author>
<published>2016-06-13T14:45:21+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/talos-op-linux/commit/?id=1f5bd336b9150560458b03460cbcfcfbcf8995b1'/>
<id>urn:sha1:1f5bd336b9150560458b03460cbcfcfbcf8995b1</id>
<content type='text'>
For some protocols like NVMe over Fabrics we need to be able to send
initialization commands to a specific queue.

Based on an earlier patch from Christoph Hellwig &lt;hch@lst.de&gt;.

Signed-off-by: Ming Lin &lt;ming.l@ssi.samsung.com&gt;
[hch: disallow sleeping allocation, req_op fixes]
Signed-off-by: Christoph Hellwig &lt;hch@lst.de&gt;
Reviewed-by: Keith Busch &lt;keith.busch@intel.com&gt;
Signed-off-by: Jens Axboe &lt;axboe@fb.com&gt;
</content>
</entry>
<entry>
<title>blk-mq: Make blk_mq_all_tag_busy_iter static</title>
<updated>2016-04-12T21:07:36+00:00</updated>
<author>
<name>Sagi Grimberg</name>
<email>sagig@mellanox.com</email>
</author>
<published>2016-03-10T11:58:49+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/talos-op-linux/commit/?id=e8f1e1630b0a98685d1a3521e8aba0dc7e68082c'/>
<id>urn:sha1:e8f1e1630b0a98685d1a3521e8aba0dc7e68082c</id>
<content type='text'>
No caller outside the blk-mq code so we can settle
with it static.

Signed-off-by: Sagi Grimberg &lt;sagig@mellanox.com&gt;
Reviewed-by: Christoph Hellwig &lt;hch@lst.de&gt;
Reviewed-by: Johannes Thumshirn &lt;jthumshirn@suse.de&gt;
Signed-off-by: Jens Axboe &lt;axboe@fb.com&gt;
</content>
</entry>
<entry>
<title>blk-mq: Export tagset iter function</title>
<updated>2016-04-12T19:43:53+00:00</updated>
<author>
<name>Sagi Grimberg</name>
<email>sagig@mellanox.com</email>
</author>
<published>2016-03-10T11:58:46+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/talos-op-linux/commit/?id=e0489487ec9cd79ee1fa0dc5d3789c08b0e51a2c'/>
<id>urn:sha1:e0489487ec9cd79ee1fa0dc5d3789c08b0e51a2c</id>
<content type='text'>
Its useful to iterate on all the active tags in cases
where we will need to fail all the queues IO.

Signed-off-by: Sagi Grimberg &lt;sagig@mellanox.com&gt;
[hch: carefully check for valid tagsets]
Reviewed-by: Christoph Hellwig &lt;hch@lst.de&gt;
Reviewed-by: Johannes Thumshirn &lt;jthumshirn@suse.de&gt;
Signed-off-by: Jens Axboe &lt;axboe@fb.com&gt;
</content>
</entry>
<entry>
<title>blk-mq: Use proper cpumask iterator</title>
<updated>2016-03-20T15:34:02+00:00</updated>
<author>
<name>Thomas Gleixner</name>
<email>tglx@linutronix.de</email>
</author>
<published>2016-03-19T10:30:33+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/talos-op-linux/commit/?id=897bb0c7f1ea82d7cc882b19790b5e1df00ffc29'/>
<id>urn:sha1:897bb0c7f1ea82d7cc882b19790b5e1df00ffc29</id>
<content type='text'>
queue_for_each_ctx() iterates over per_cpu variables under the assumption that
the possible cpu mask cannot have holes. That's wrong as all cpumasks can have
holes. In case there are holes the iteration ends up accessing uninitialized
memory and crashing as a result.

Replace the macro by a proper for_each_possible_cpu() loop and drop the unused
macro blk_ctx_sum() which references queue_for_each_ctx().

Reported-by: Xiong Zhou &lt;jencce.kernel@gmail.com&gt;
Signed-off-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Signed-off-by: Jens Axboe &lt;axboe@fb.com&gt;
</content>
</entry>
<entry>
<title>blk-mq: dynamic h/w context count</title>
<updated>2016-02-09T19:42:17+00:00</updated>
<author>
<name>Keith Busch</name>
<email>keith.busch@intel.com</email>
</author>
<published>2015-12-18T00:08:14+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/talos-op-linux/commit/?id=868f2f0b72068a097508b6e8870a8950fd8eb7ef'/>
<id>urn:sha1:868f2f0b72068a097508b6e8870a8950fd8eb7ef</id>
<content type='text'>
The hardware's provided queue count may change at runtime with resource
provisioning. This patch allows a block driver to alter the number of
h/w queues available when its resource count changes.

The main part is a new blk-mq API to request a new number of h/w queues
for a given live tag set. The new API freezes all queues using that set,
then adjusts the allocated count prior to remapping these to CPUs.

The bulk of the rest just shifts where h/w contexts and all their
artifacts are allocated and freed.

The number of max h/w contexts is capped to the number of possible cpus
since there is no use for more than that. As such, all pre-allocated
memory for pointers need to account for the max possible rather than
the initial number of queues.

A side effect of this is that the blk-mq will proceed successfully as
long as it can allocate at least one h/w context. Previously it would
fail request queue initialization if less than the requested number
was allocated.

Signed-off-by: Keith Busch &lt;keith.busch@intel.com&gt;
Reviewed-by: Christoph Hellwig &lt;hch@lst.de&gt;
Tested-by: Jon Derrick &lt;jonathan.derrick@intel.com&gt;
Signed-off-by: Jens Axboe &lt;axboe@fb.com&gt;
</content>
</entry>
<entry>
<title>blk-mq: add a flags parameter to blk_mq_alloc_request</title>
<updated>2015-12-01T17:53:59+00:00</updated>
<author>
<name>Christoph Hellwig</name>
<email>hch@lst.de</email>
</author>
<published>2015-11-26T08:13:05+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/talos-op-linux/commit/?id=6f3b0e8bcf3cbb87a7459b3ed018d31d918df3f8'/>
<id>urn:sha1:6f3b0e8bcf3cbb87a7459b3ed018d31d918df3f8</id>
<content type='text'>
We already have the reserved flag, and a nowait flag awkwardly encoded as
a gfp_t.  Add a real flags argument to make the scheme more extensible and
allow for a nicer calling convention.

Signed-off-by: Christoph Hellwig &lt;hch@lst.de&gt;
Signed-off-by: Jens Axboe &lt;axboe@fb.com&gt;
</content>
</entry>
<entry>
<title>block: add block polling support</title>
<updated>2015-11-07T17:40:47+00:00</updated>
<author>
<name>Jens Axboe</name>
<email>axboe@fb.com</email>
</author>
<published>2015-11-05T17:44:55+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/talos-op-linux/commit/?id=05229beeddf7e75e2e616ddaad4b70e7fca9528d'/>
<id>urn:sha1:05229beeddf7e75e2e616ddaad4b70e7fca9528d</id>
<content type='text'>
Add basic support for polling for specific IO to complete. This uses
the cookie that blk-mq passes back, which enables the block layer
to pass this cookie to the driver to spin for a specific request.

This will be combined with request latency tracking, so we can make
qualified decisions about when to poll and when not to. For now, for
benchmark purposes, we add a sysfs file that controls whether polling
is enabled or not.

Signed-off-by: Jens Axboe &lt;axboe@fb.com&gt;
Acked-by: Christoph Hellwig &lt;hch@lst.de&gt;
Acked-by: Keith Busch &lt;keith.busch@intel.com&gt;
</content>
</entry>
<entry>
<title>block: generic request_queue reference counting</title>
<updated>2015-10-21T20:43:41+00:00</updated>
<author>
<name>Dan Williams</name>
<email>dan.j.williams@intel.com</email>
</author>
<published>2015-10-21T17:20:12+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/talos-op-linux/commit/?id=3ef28e83ab15799742e55fd13243a5f678b04242'/>
<id>urn:sha1:3ef28e83ab15799742e55fd13243a5f678b04242</id>
<content type='text'>
Allow pmem, and other synchronous/bio-based block drivers, to fallback
on a per-cpu reference count managed by the core for tracking queue
live/dead state.

The existing per-cpu reference count for the blk_mq case is promoted to
be used in all block i/o scenarios.  This involves initializing it by
default, waiting for it to drop to zero at exit, and holding a live
reference over the invocation of q-&gt;make_request_fn() in
generic_make_request().  The blk_mq code continues to take its own
reference per blk_mq request and retains the ability to freeze the
queue, but the check that the queue is frozen is moved to
generic_make_request().

This fixes crash signatures like the following:

 BUG: unable to handle kernel paging request at ffff880140000000
 [..]
 Call Trace:
  [&lt;ffffffff8145e8bf&gt;] ? copy_user_handle_tail+0x5f/0x70
  [&lt;ffffffffa004e1e0&gt;] pmem_do_bvec.isra.11+0x70/0xf0 [nd_pmem]
  [&lt;ffffffffa004e331&gt;] pmem_make_request+0xd1/0x200 [nd_pmem]
  [&lt;ffffffff811c3162&gt;] ? mempool_alloc+0x72/0x1a0
  [&lt;ffffffff8141f8b6&gt;] generic_make_request+0xd6/0x110
  [&lt;ffffffff8141f966&gt;] submit_bio+0x76/0x170
  [&lt;ffffffff81286dff&gt;] submit_bh_wbc+0x12f/0x160
  [&lt;ffffffff81286e62&gt;] submit_bh+0x12/0x20
  [&lt;ffffffff813395bd&gt;] jbd2_write_superblock+0x8d/0x170
  [&lt;ffffffff8133974d&gt;] jbd2_mark_journal_empty+0x5d/0x90
  [&lt;ffffffff813399cb&gt;] jbd2_journal_destroy+0x24b/0x270
  [&lt;ffffffff810bc4ca&gt;] ? put_pwq_unlocked+0x2a/0x30
  [&lt;ffffffff810bc6f5&gt;] ? destroy_workqueue+0x225/0x250
  [&lt;ffffffff81303494&gt;] ext4_put_super+0x64/0x360
  [&lt;ffffffff8124ab1a&gt;] generic_shutdown_super+0x6a/0xf0

Cc: Jens Axboe &lt;axboe@kernel.dk&gt;
Cc: Keith Busch &lt;keith.busch@intel.com&gt;
Cc: Ross Zwisler &lt;ross.zwisler@linux.intel.com&gt;
Suggested-by: Christoph Hellwig &lt;hch@lst.de&gt;
Reviewed-by: Christoph Hellwig &lt;hch@lst.de&gt;
Tested-by: Ross Zwisler &lt;ross.zwisler@linux.intel.com&gt;
Signed-off-by: Dan Williams &lt;dan.j.williams@intel.com&gt;
Signed-off-by: Jens Axboe &lt;axboe@fb.com&gt;
</content>
</entry>
<entry>
<title>blk-mq: factor out a helper to iterate all tags for a request_queue</title>
<updated>2015-10-01T08:10:57+00:00</updated>
<author>
<name>Christoph Hellwig</name>
<email>hch@lst.de</email>
</author>
<published>2015-09-27T19:01:51+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/talos-op-linux/commit/?id=0bf6cd5b9531bcc29c0a5e504b6ce2984c6fd8d8'/>
<id>urn:sha1:0bf6cd5b9531bcc29c0a5e504b6ce2984c6fd8d8</id>
<content type='text'>
And replace the blk_mq_tag_busy_iter with it - the driver use has been
replaced with a new helper a while ago, and internal to the block we
only need the new version.

Signed-off-by: Christoph Hellwig &lt;hch@lst.de&gt;
Signed-off-by: Jens Axboe &lt;axboe@fb.com&gt;
</content>
</entry>
</feed>
