<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/drivers/block/null_blk.c, branch v4.4</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/
</subtitle>
<id>https://git.shady.money/linux/atom?h=v4.4</id>
<link rel='self' href='https://git.shady.money/linux/atom?h=v4.4'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/'/>
<updated>2015-12-28T20:07:09Z</updated>
<entry>
<title>null_blk: use async queue restart helper</title>
<updated>2015-12-28T20:07:09Z</updated>
<author>
<name>Jens Axboe</name>
<email>axboe@fb.com</email>
</author>
<published>2015-12-28T20:02:47Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=48cc661e7f4cec80b6aa894cc6902c292f201ea8'/>
<id>urn:sha1:48cc661e7f4cec80b6aa894cc6902c292f201ea8</id>
<content type='text'>
If null_blk is run in NULL_IRQ_TIMER mode and with queue_mode NULL_Q_RQ,
we need to restart the queue from the hrtimer interrupt. We can't
directly invoke the request_fn from that context, so punt the queue run
to async kblockd context.

Tested-by: Rabin Vincent &lt;rabin@rab.in&gt;
Signed-off-by: Jens Axboe &lt;axboe@fb.com&gt;
</content>
</entry>
<entry>
<title>null_blk: fix use-after-free error</title>
<updated>2015-12-22T17:42:48Z</updated>
<author>
<name>Mike Krinkin</name>
<email>krinkin.m.u@gmail.com</email>
</author>
<published>2015-12-15T09:56:40Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=e8271201462710dbbaa0448b768428606724ca90'/>
<id>urn:sha1:e8271201462710dbbaa0448b768428606724ca90</id>
<content type='text'>
blk_end_request_all may free request, so we need to save
request_queue pointer before blk_end_request_all call.

The problem was introduced in commit cf8ecc5a8455266f8d51
("null_blk: guarantee device restart in all irq modes")
and causes general protection fault with slab poisoning
enabled.

Fixes: cf8ecc5a8455266f8d51 ("null_blk: guarantee device
       restart in all irq modes")

Signed-off-by: Mike Krinkin &lt;krinkin.m.u@gmail.com&gt;
Reviewed-by: Ming Lei &lt;tom.leiming@gmail.com&gt;
Signed-off-by: Jens Axboe &lt;axboe@fb.com&gt;
</content>
</entry>
<entry>
<title>null_blk: Fix error path in module initialization</title>
<updated>2015-12-08T20:47:34Z</updated>
<author>
<name>Minfei Huang</name>
<email>mhuang@redhat.com</email>
</author>
<published>2015-12-08T20:47:34Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=af096e2235c5de76af7e8749f59a90de07f5e943'/>
<id>urn:sha1:af096e2235c5de76af7e8749f59a90de07f5e943</id>
<content type='text'>
Module couldn't release resource properly during the initialization. To
fix this issue, we will clean up the proper resource before returning.

Signed-off-by: Minfei Huang &lt;mnfhuang@gmail.com&gt;
Signed-off-by: Jens Axboe &lt;axboe@fb.com&gt;
</content>
</entry>
<entry>
<title>lightnvm: replace req queue with nvmdev for lld</title>
<updated>2015-12-07T16:14:19Z</updated>
<author>
<name>Matias Bjørling</name>
<email>m@bjorling.me</email>
</author>
<published>2015-12-06T10:25:48Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=16f26c3aa9b9c36a9d1092ae3258461d1008481e'/>
<id>urn:sha1:16f26c3aa9b9c36a9d1092ae3258461d1008481e</id>
<content type='text'>
In the case where a request queue is passed to the low lever lightnvm
device drive integration, the device driver might pass its admin
commands through another queue. Instead pass nvm_dev, and let the
low level drive the appropriate queue.

Reported-by: Christoph Hellwig &lt;hch@infradead.org&gt;
Signed-off-by: Matias Bjørling &lt;m@bjorling.me&gt;
Signed-off-by: Jens Axboe &lt;axboe@fb.com&gt;
</content>
</entry>
<entry>
<title>null_blk: change type of completion_nsec to unsigned long</title>
<updated>2015-12-01T17:52:12Z</updated>
<author>
<name>Arianna Avanzini</name>
<email>avanzini@google.com</email>
</author>
<published>2015-12-01T10:48:19Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=dbac117542b7e814245c43daa638a3626230cb2a'/>
<id>urn:sha1:dbac117542b7e814245c43daa638a3626230cb2a</id>
<content type='text'>
This commit at least doubles the maximum value for
completion_nsec. This helps in special cases where one wants/needs to
emulate an extremely slow I/O (for example to spot bugs).

Signed-off-by: Paolo Valente &lt;paolo.valente@unimore.it&gt;
Signed-off-by: Arianna Avanzini &lt;avanzini@google.com&gt;
Signed-off-by: Jens Axboe &lt;axboe@fb.com&gt;
</content>
</entry>
<entry>
<title>null_blk: guarantee device restart in all irq modes</title>
<updated>2015-12-01T17:52:10Z</updated>
<author>
<name>Arianna Avanzini</name>
<email>avanzini@google.com</email>
</author>
<published>2015-12-01T10:48:18Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=cf8ecc5a8455266f8d516426b2acd36f9bdfa061'/>
<id>urn:sha1:cf8ecc5a8455266f8d516426b2acd36f9bdfa061</id>
<content type='text'>
In single-queue (block layer) mode,the function null_rq_prep_fn stops
the device if alloc_cmd fails. Then, once stopped, the device must be
restarted on the next command completion, so that the request(s) for
which alloc_cmd failed can be requeued. Otherwise the device hangs.

Unfortunately, device restart is currently performed only for delayed
completions, i.e., in irqmode==2. This fact causes hangs, for the
above reasons, with the other irqmodes in combination with single-queue
block layer.

This commits addresses this issue by making sure that, if stopped, the
device is properly restarted for all irqmodes on completions.

Signed-off-by: Paolo Valente &lt;paolo.valente@unimore.it&gt;
Signed-off-by: Arianna AVanzini &lt;avanzini@google.com&gt;
Signed-off-by: Jens Axboe &lt;axboe@fb.com&gt;
</content>
</entry>
<entry>
<title>null_blk: set a separate timer for each command</title>
<updated>2015-12-01T17:52:08Z</updated>
<author>
<name>Paolo Valente</name>
<email>paolo.valente@unimore.it</email>
</author>
<published>2015-12-01T10:48:17Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=3c395a969acc690f331d5fb91ec99ea8eb5155dd'/>
<id>urn:sha1:3c395a969acc690f331d5fb91ec99ea8eb5155dd</id>
<content type='text'>
For the Timer IRQ mode (i.e., when command completions are delayed),
there is one timer for each CPU. Each of these timers
. has a completion queue associated with it, containing all the
  command completions to be executed when the timer fires;
. is set, and a new completion-to-execute is inserted into its
  completion queue, every time the dispatch code for a new command
  happens to be executed on the CPU related to the timer.

This implies that, if the dispatch of a new command happens to be
executed on a CPU whose timer has already been set, but has not yet
fired, then the timer is set again, to the completion time of the
newly arrived command. When the timer eventually fires, all its queued
completions are executed.

This way of handling delayed command completions entails the following
problem: if more than one command completion is inserted into the
queue of a timer before the timer fires, then the expiration time for
the timer is moved forward every time each of these completions is
enqueued. As a consequence, only the last completion enqueued enjoys a
correct execution time, while all previous completions are unjustly
delayed until the last completion is executed (and at that time they
are executed all together).

Specifically, if all the above completions are enqueued almost at the
same time, then the problem is negligible. On the opposite end, if
every completion is enqueued a while after the previous completion was
enqueued (in the extreme case, it is enqueued only right before the
timer would have expired), then every enqueued completion, except for
the last one, experiences an inflated delay, proportional to the number
of completions enqueued after it. In the end, commands, and thus I/O
requests, may be completed at an arbitrarily lower rate than the
desired one.

This commit addresses this issue by replacing per-CPU timers with
per-command timers, i.e., by associating an individual timer with each
command.

Signed-off-by: Paolo Valente &lt;paolo.valente@unimore.it&gt;
Signed-off-by: Arianna Avanzini &lt;avanzini@google.com&gt;
Signed-off-by: Jens Axboe &lt;axboe@fb.com&gt;
</content>
</entry>
<entry>
<title>null_blk: do not del gendisk with lightnvm</title>
<updated>2015-11-19T22:15:56Z</updated>
<author>
<name>Matias Bjørling</name>
<email>m@bjorling.me</email>
</author>
<published>2015-11-19T11:50:10Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=54514aa465e94316a4bf1c5dfe970536bec3e76f'/>
<id>urn:sha1:54514aa465e94316a4bf1c5dfe970536bec3e76f</id>
<content type='text'>
The gendisk structure has not been initialized when using lightnvm.
Make sure to not delete it upon exit. Also make sure that we use the
appropriate disk_name at unregistration.

Signed-off-by: Matias Bjørling &lt;m@bjorling.me&gt;
Signed-off-by: Jens Axboe &lt;axboe@fb.com&gt;
</content>
</entry>
<entry>
<title>null_blk: use device addressing mode</title>
<updated>2015-11-19T22:15:54Z</updated>
<author>
<name>Matias Bjørling</name>
<email>m@bjorling.me</email>
</author>
<published>2015-11-19T11:50:09Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=5b40db99099ddebe31e9b1b759894cf09c0c6679'/>
<id>urn:sha1:5b40db99099ddebe31e9b1b759894cf09c0c6679</id>
<content type='text'>
The linear addressing mode was removed in 7386af2. Make null_blk instead
expose the ppa format geometry and support the generic addressing mode.

Signed-off-by: Matias Bjørling &lt;m@bjorling.me&gt;
Signed-off-by: Jens Axboe &lt;axboe@fb.com&gt;
</content>
</entry>
<entry>
<title>null_blk: use ppa_cache pool</title>
<updated>2015-11-19T22:15:53Z</updated>
<author>
<name>Matias Bjørling</name>
<email>m@bjorling.me</email>
</author>
<published>2015-11-19T11:50:08Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=6bb9535bc3f59194a0ae17b17ca71aecd0f7e3a2'/>
<id>urn:sha1:6bb9535bc3f59194a0ae17b17ca71aecd0f7e3a2</id>
<content type='text'>
Instead of using a page pool, we can save memory by only allocating room
for 64 entries for the ppa command. Introduce a ppa_cache to allocate only
the required memory for the ppa list.

Signed-off-by: Matias Bjørling &lt;m@bjorling.me&gt;
Signed-off-by: Jens Axboe &lt;axboe@fb.com&gt;
</content>
</entry>
</feed>
