<feed xmlns='http://www.w3.org/2005/Atom'>
<title>user/sven/linux.git/include/linux/blkdev.h, branch v4.13.7</title>
<subtitle>Linux Kernel
</subtitle>
<id>https://git.stealer.net/cgit.cgi/user/sven/linux.git/atom?h=v4.13.7</id>
<link rel='self' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/atom?h=v4.13.7'/>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/'/>
<updated>2017-08-24T14:22:10Z</updated>
<entry>
<title>bsg-lib: fix kernel panic resulting from missing allocation of reply-buffer</title>
<updated>2017-08-24T14:22:10Z</updated>
<author>
<name>Benjamin Block</name>
<email>bblock@linux.vnet.ibm.com</email>
</author>
<published>2017-08-23T23:57:56Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=50b4d485528d1dbe0bd249f2073140e3444f4a7b'/>
<id>urn:sha1:50b4d485528d1dbe0bd249f2073140e3444f4a7b</id>
<content type='text'>
Since we split the scsi_request out of struct request bsg fails to
provide a reply-buffer for the drivers. This was done via the pointer
for sense-data, that is not preallocated anymore.

Failing to allocate/assign it results in illegal dereferences because
LLDs use this pointer unquestioned.

An example panic on s390x, using the zFCP driver, looks like this (I had
debugging on, otherwise NULL-pointer dereferences wouldn't even panic on
s390x):

Unable to handle kernel pointer dereference in virtual kernel address space
Failing address: 6b6b6b6b6b6b6000 TEID: 6b6b6b6b6b6b6403
Fault in home space mode while using kernel ASCE.
AS:0000000001590007 R3:0000000000000024
Oops: 0038 ilc:2 [#1] PREEMPT SMP DEBUG_PAGEALLOC
Modules linked in: &lt;Long List&gt;
CPU: 2 PID: 0 Comm: swapper/2 Not tainted 4.12.0-bsg-regression+ #3
Hardware name: IBM 2964 N96 702 (z/VM 6.4.0)
task: 0000000065cb0100 task.stack: 0000000065cb4000
Krnl PSW : 0704e00180000000 000003ff801e4156 (zfcp_fc_ct_els_job_handler+0x16/0x58 [zfcp])
           R:0 T:1 IO:1 EX:1 Key:0 M:1 W:0 P:0 AS:3 CC:2 PM:0 RI:0 EA:3
Krnl GPRS: 0000000000000001 000000005fa9d0d0 000000005fa9d078 0000000000e16866
           000003ff00000290 6b6b6b6b6b6b6b6b 0000000059f78f00 000000000000000f
           00000000593a0958 00000000593a0958 0000000060d88800 000000005ddd4c38
           0000000058b50100 07000000659cba08 000003ff801e8556 00000000659cb9a8
Krnl Code: 000003ff801e4146: e31020500004        lg      %r1,80(%r2)
           000003ff801e414c: 58402040           l       %r4,64(%r2)
          #000003ff801e4150: e35020200004       lg      %r5,32(%r2)
          &gt;000003ff801e4156: 50405004           st      %r4,4(%r5)
           000003ff801e415a: e54c50080000       mvhi    8(%r5),0
           000003ff801e4160: e33010280012       lt      %r3,40(%r1)
           000003ff801e4166: a718fffb           lhi     %r1,-5
           000003ff801e416a: 1803               lr      %r0,%r3
Call Trace:
([&lt;000003ff801e8556&gt;] zfcp_fsf_req_complete+0x726/0x768 [zfcp])
 [&lt;000003ff801ea82a&gt;] zfcp_fsf_reqid_check+0x102/0x180 [zfcp]
 [&lt;000003ff801eb980&gt;] zfcp_qdio_int_resp+0x230/0x278 [zfcp]
 [&lt;00000000009b91b6&gt;] qdio_kick_handler+0x2ae/0x2c8
 [&lt;00000000009b9e3e&gt;] __tiqdio_inbound_processing+0x406/0xc10
 [&lt;00000000001684c2&gt;] tasklet_action+0x15a/0x1d8
 [&lt;0000000000bd28ec&gt;] __do_softirq+0x3ec/0x848
 [&lt;00000000001675a4&gt;] irq_exit+0x74/0xf8
 [&lt;000000000010dd6a&gt;] do_IRQ+0xba/0xf0
 [&lt;0000000000bd19e8&gt;] io_int_handler+0x104/0x2d4
 [&lt;00000000001033b6&gt;] enabled_wait+0xb6/0x188
([&lt;000000000010339e&gt;] enabled_wait+0x9e/0x188)
 [&lt;000000000010396a&gt;] arch_cpu_idle+0x32/0x50
 [&lt;0000000000bd0112&gt;] default_idle_call+0x52/0x68
 [&lt;00000000001cd0fa&gt;] do_idle+0x102/0x188
 [&lt;00000000001cd41e&gt;] cpu_startup_entry+0x3e/0x48
 [&lt;0000000000118c64&gt;] smp_start_secondary+0x11c/0x130
 [&lt;0000000000bd2016&gt;] restart_int_handler+0x62/0x78
 [&lt;0000000000000000&gt;]           (null)
INFO: lockdep is turned off.
Last Breaking-Event-Address:
 [&lt;000003ff801e41d6&gt;] zfcp_fc_ct_job_handler+0x3e/0x48 [zfcp]

Kernel panic - not syncing: Fatal exception in interrupt

This patch moves bsg-lib to allocate and setup struct bsg_job ahead of
time, including the allocation of a buffer for the reply-data.

This means, struct bsg_job is not allocated separately anymore, but as part
of struct request allocation - similar to struct scsi_cmd. Reflect this in
the function names that used to handle creation/destruction of struct
bsg_job.

Reported-by: Steffen Maier &lt;maier@linux.vnet.ibm.com&gt;
Suggested-by: Christoph Hellwig &lt;hch@lst.de&gt;
Reviewed-by: Christoph Hellwig &lt;hch@lst.de&gt;
Signed-off-by: Benjamin Block &lt;bblock@linux.vnet.ibm.com&gt;
Fixes: 82ed4db499b8 ("block: split scsi_request out of struct request")
Cc: &lt;stable@vger.kernel.org&gt; #4.11+
Signed-off-by: Jens Axboe &lt;axboe@kernel.dk&gt;
</content>
</entry>
<entry>
<title>block: remove the queue_bounce_pfn helper</title>
<updated>2017-06-27T18:13:45Z</updated>
<author>
<name>Christoph Hellwig</name>
<email>hch@lst.de</email>
</author>
<published>2017-06-19T07:26:22Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=1c4bc3ab9a064d98cdf6de6b44f89d5c3757fa32'/>
<id>urn:sha1:1c4bc3ab9a064d98cdf6de6b44f89d5c3757fa32</id>
<content type='text'>
Only used inside the bounce code, and opencoding it makes it more obvious
what is going on.

Signed-off-by: Christoph Hellwig &lt;hch@lst.de&gt;
Signed-off-by: Jens Axboe &lt;axboe@kernel.dk&gt;
</content>
</entry>
<entry>
<title>block: move bounce declarations to block/blk.h</title>
<updated>2017-06-27T18:13:45Z</updated>
<author>
<name>Christoph Hellwig</name>
<email>hch@lst.de</email>
</author>
<published>2017-06-19T07:26:21Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=3bce016a4c5975e4279bfb3cbd6d0332b856cc72'/>
<id>urn:sha1:3bce016a4c5975e4279bfb3cbd6d0332b856cc72</id>
<content type='text'>
Signed-off-by: Christoph Hellwig &lt;hch@lst.de&gt;
Signed-off-by: Jens Axboe &lt;axboe@kernel.dk&gt;
</content>
</entry>
<entry>
<title>blk-mq: expose write hints through debugfs</title>
<updated>2017-06-27T18:05:31Z</updated>
<author>
<name>Jens Axboe</name>
<email>axboe@kernel.dk</email>
</author>
<published>2017-06-26T14:15:27Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=f793dfd3f39a3dc50468b06498606b3a906f42f1'/>
<id>urn:sha1:f793dfd3f39a3dc50468b06498606b3a906f42f1</id>
<content type='text'>
Useful to verify that things are working the way they should.
Reading the file will return number of kb written with each
write hint. Writing the file will reset the statistics. No care
is taken to ensure that we don't race on updates.

Drivers will write to q-&gt;write_hints[] if they handle a given
write hint.

Reviewed-by: Andreas Dilger &lt;adilger@dilger.ca&gt;
Reviewed-by: Martin K. Petersen &lt;martin.petersen@oracle.com&gt;
Reviewed-by: Christoph Hellwig &lt;hch@lst.de&gt;
Signed-off-by: Jens Axboe &lt;axboe@kernel.dk&gt;
</content>
</entry>
<entry>
<title>block: add support for write hints in a bio</title>
<updated>2017-06-27T18:05:27Z</updated>
<author>
<name>Jens Axboe</name>
<email>axboe@kernel.dk</email>
</author>
<published>2017-06-27T15:22:02Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=cb6934f8ea1a595902ca37e250e0917d4dd7b2a7'/>
<id>urn:sha1:cb6934f8ea1a595902ca37e250e0917d4dd7b2a7</id>
<content type='text'>
No functional changes in this patch, we just use up some holes
in the bio and request structures to define a write hint that
we psas down the stack.

Ensure that we don't merge requests that have different life time
hints assigned to them, and that we inherit the write hint when
cloning a bio.

Reviewed-by: Martin K. Petersen &lt;martin.petersen@oracle.com&gt;
Reviewed-by: Christoph Hellwig &lt;hch@lst.de&gt;
Signed-off-by: Jens Axboe &lt;axboe@kernel.dk&gt;
</content>
</entry>
<entry>
<title>Merge commit '8e8320c9315c' into for-4.13/block</title>
<updated>2017-06-23T03:55:24Z</updated>
<author>
<name>Jens Axboe</name>
<email>axboe@kernel.dk</email>
</author>
<published>2017-06-23T03:55:24Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=f95a0d6a95b12a79b7492da7ab687ae4cd741124'/>
<id>urn:sha1:f95a0d6a95b12a79b7492da7ab687ae4cd741124</id>
<content type='text'>
Pull in the fix for shared tags, as it conflicts with the pending
changes in for-4.13/block. We already pulled in v4.12-rc5 to solve
other conflicts or get fixes that went into 4.12, so not a lot
of changes in this merge.

Signed-off-by: Jens Axboe &lt;axboe@kernel.dk&gt;
</content>
</entry>
<entry>
<title>blk-mq: fix performance regression with shared tags</title>
<updated>2017-06-21T16:17:49Z</updated>
<author>
<name>Jens Axboe</name>
<email>axboe@kernel.dk</email>
</author>
<published>2017-06-20T23:56:13Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=8e8320c9315c47a6a090188720ccff32a6a6ba18'/>
<id>urn:sha1:8e8320c9315c47a6a090188720ccff32a6a6ba18</id>
<content type='text'>
If we have shared tags enabled, then every IO completion will trigger
a full loop of every queue belonging to a tag set, and every hardware
queue for each of those queues, even if nothing needs to be done.
This causes a massive performance regression if you have a lot of
shared devices.

Instead of doing this huge full scan on every IO, add an atomic
counter to the main queue that tracks how many hardware queues have
been marked as needing a restart. With that, we can avoid looking for
restartable queues, if we don't have to.

Max reports that this restores performance. Before this patch, 4K
IOPS was limited to 22-23K IOPS. With the patch, we are running at
950-970K IOPS.

Fixes: 6d8c6c0f97ad ("blk-mq: Restart a single queue if tag sets are shared")
Reported-by: Max Gurtovoy &lt;maxg@mellanox.com&gt;
Tested-by: Max Gurtovoy &lt;maxg@mellanox.com&gt;
Reviewed-by: Bart Van Assche &lt;bart.vanassche@sandisk.com&gt;
Tested-by: Bart Van Assche &lt;bart.vanassche@wdc.com&gt;
Signed-off-by: Jens Axboe &lt;axboe@kernel.dk&gt;
</content>
</entry>
<entry>
<title>block: Add a comment above queue_lockdep_assert_held()</title>
<updated>2017-06-21T01:27:14Z</updated>
<author>
<name>Bart Van Assche</name>
<email>bart.vanassche@sandisk.com</email>
</author>
<published>2017-06-20T18:15:44Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=9e0c829906b9aa1e7ad84689f2bcd56457bdb417'/>
<id>urn:sha1:9e0c829906b9aa1e7ad84689f2bcd56457bdb417</id>
<content type='text'>
Add a comment above the queue_lockdep_assert_held() macro that
explains the purpose of the q-&gt;queue_lock test.

Signed-off-by: Bart Van Assche &lt;bart.vanassche@sandisk.com&gt;
Reviewed-by: Christoph Hellwig &lt;hch@lst.de&gt;
Cc: Hannes Reinecke &lt;hare@suse.com&gt;
Cc: Omar Sandoval &lt;osandov@fb.com&gt;
Cc: Ming Lei &lt;ming.lei@redhat.com&gt;
Signed-off-by: Jens Axboe &lt;axboe@kernel.dk&gt;
</content>
</entry>
<entry>
<title>block: Introduce request_queue.initialize_rq_fn()</title>
<updated>2017-06-21T01:27:14Z</updated>
<author>
<name>Bart Van Assche</name>
<email>bart.vanassche@sandisk.com</email>
</author>
<published>2017-06-20T18:15:40Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=d280bab305431c1836423f3cd6a5ff0e35a601ef'/>
<id>urn:sha1:d280bab305431c1836423f3cd6a5ff0e35a601ef</id>
<content type='text'>
Several block drivers need to initialize the driver-private request
data after having called blk_get_request() and before .prep_rq_fn()
is called, e.g. when submitting a REQ_OP_SCSI_* request. Avoid that
that initialization code has to be repeated after every
blk_get_request() call by adding new callback functions to struct
request_queue and to struct blk_mq_ops.

Signed-off-by: Bart Van Assche &lt;bart.vanassche@sandisk.com&gt;
Cc: Christoph Hellwig &lt;hch@lst.de&gt;
Cc: Hannes Reinecke &lt;hare@suse.com&gt;
Cc: Omar Sandoval &lt;osandov@fb.com&gt;
Signed-off-by: Jens Axboe &lt;axboe@kernel.dk&gt;
</content>
</entry>
<entry>
<title>block: Make request operation type argument declarations consistent</title>
<updated>2017-06-21T01:27:14Z</updated>
<author>
<name>Bart Van Assche</name>
<email>bart.vanassche@sandisk.com</email>
</author>
<published>2017-06-20T18:15:39Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=cd6ce1482fd9e691bb68c660fa918c90f6b1bc25'/>
<id>urn:sha1:cd6ce1482fd9e691bb68c660fa918c90f6b1bc25</id>
<content type='text'>
Instead of declaring the second argument of blk_*_get_request()
as int and passing it to functions that expect an unsigned int,
declare that second argument as unsigned int. Also because of
consistency, rename that second argument from 'rw' into 'op'.
This patch does not change any functionality.

Signed-off-by: Bart Van Assche &lt;bart.vanassche@sandisk.com&gt;
Reviewed-by: Christoph Hellwig &lt;hch@lst.de&gt;
Cc: Hannes Reinecke &lt;hare@suse.com&gt;
Cc: Omar Sandoval &lt;osandov@fb.com&gt;
Cc: Ming Lei &lt;ming.lei@redhat.com&gt;
Signed-off-by: Jens Axboe &lt;axboe@kernel.dk&gt;
</content>
</entry>
</feed>
