<feed xmlns='http://www.w3.org/2005/Atom'>
<title>user/sven/linux.git/include/linux/sbitmap.h, branch v5.15.26</title>
<subtitle>Linux Kernel
</subtitle>
<id>https://git.stealer.net/cgit.cgi/user/sven/linux.git/atom?h=v5.15.26</id>
<link rel='self' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/atom?h=v5.15.26'/>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/'/>
<updated>2021-03-19T02:39:30Z</updated>
<entry>
<title>scsi: sbitmap: Silence a debug kernel warning triggered by sbitmap_put()</title>
<updated>2021-03-19T02:39:30Z</updated>
<author>
<name>Bart Van Assche</name>
<email>bvanassche@acm.org</email>
</author>
<published>2021-03-17T03:26:48Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=035e9f471691a16c32b389c8b2f236043a2a50d7'/>
<id>urn:sha1:035e9f471691a16c32b389c8b2f236043a2a50d7</id>
<content type='text'>
All sbitmap code uses implied preemption protection to update
sb-&gt;alloc_hint except sbitmap_put(). Using implied preemption protection is
safe since the value of sb-&gt;alloc_hint only affects performance of sbitmap
allocations but not their correctness. Change this_cpu_ptr() in
sbitmap_put() into raw_cpu_ptr() to suppress the following kernel warning
that appears with preemption debugging enabled (CONFIG_DEBUG_PREEMPT):

BUG: using smp_processor_id() in preemptible [00000000] code: scsi_eh_0/152
caller is debug_smp_processor_id+0x17/0x20
CPU: 1 PID: 152 Comm: scsi_eh_0 Tainted: G        W         5.12.0-rc1-dbg+ #6
Call Trace:
 show_stack+0x52/0x58
 dump_stack+0xaf/0xf3
 check_preemption_disabled+0xce/0xd0
 debug_smp_processor_id+0x17/0x20
 scsi_device_unbusy+0x13a/0x1c0 [scsi_mod]
 scsi_finish_command+0x4d/0x290 [scsi_mod]
 scsi_eh_flush_done_q+0x1e7/0x280 [scsi_mod]
 ata_scsi_port_error_handler+0x592/0x750 [libata]
 ata_scsi_error+0x1a0/0x1f0 [libata]
 scsi_error_handler+0x19e/0x330 [scsi_mod]
 kthread+0x222/0x250
 ret_from_fork+0x1f/0x30

Link: https://lore.kernel.org/r/20210317032648.9080-1-bvanassche@acm.org
Fixes: c548e62bcf6a ("scsi: sbitmap: Move allocation hint into sbitmap")
Cc: Hannes Reinecke &lt;hare@suse.de&gt;
Cc: Omar Sandoval &lt;osandov@fb.com&gt;
Reviewed-by: Ming Lei &lt;ming.lei@redhat.com&gt;
Reviewed-by: Christoph Hellwig &lt;hch@lst.de&gt;
Signed-off-by: Bart Van Assche &lt;bvanassche@acm.org&gt;
Signed-off-by: Martin K. Petersen &lt;martin.petersen@oracle.com&gt;
</content>
</entry>
<entry>
<title>scsi: sbitmap: Add sbitmap_calculate_shift() helper</title>
<updated>2021-03-04T22:36:59Z</updated>
<author>
<name>Ming Lei</name>
<email>ming.lei@redhat.com</email>
</author>
<published>2021-01-22T02:33:10Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=2d13b1ea9f4affdaa7af0e0e4a1358d28f80c54f'/>
<id>urn:sha1:2d13b1ea9f4affdaa7af0e0e4a1358d28f80c54f</id>
<content type='text'>
Move code for calculating default shift into a public helper which can be
used by SCSI.

Link: https://lore.kernel.org/r/20210122023317.687987-7-ming.lei@redhat.com
Cc: Omar Sandoval &lt;osandov@fb.com&gt;
Cc: Kashyap Desai &lt;kashyap.desai@broadcom.com&gt;
Cc: Sumanesh Samanta &lt;sumanesh.samanta@broadcom.com&gt;
Cc: Ewan D. Milne &lt;emilne@redhat.com&gt;
Tested-by: Sumanesh Samanta &lt;sumanesh.samanta@broadcom.com&gt;
Reviewed-by: Hannes Reinecke &lt;hare@suse.de&gt;
Signed-off-by: Ming Lei &lt;ming.lei@redhat.com&gt;
Signed-off-by: Martin K. Petersen &lt;martin.petersen@oracle.com&gt;
</content>
</entry>
<entry>
<title>scsi: sbitmap: Export sbitmap_weight</title>
<updated>2021-03-04T22:36:59Z</updated>
<author>
<name>Ming Lei</name>
<email>ming.lei@redhat.com</email>
</author>
<published>2021-01-22T02:33:09Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=cbb9950b41dd9dfb7c2be3429ba09f83b8b1ff98'/>
<id>urn:sha1:cbb9950b41dd9dfb7c2be3429ba09f83b8b1ff98</id>
<content type='text'>
SCSI's .device_busy will be converted to sbitmap and sbitmap_weight is
needed. Export the helper.

The only existing user of sbitmap_weight() uses it to find out how many
bits are set and not cleared. Align sbitmap_weight() meaning with this
usage model.

Link: https://lore.kernel.org/r/20210122023317.687987-6-ming.lei@redhat.com
Cc: Omar Sandoval &lt;osandov@fb.com&gt;
Cc: Kashyap Desai &lt;kashyap.desai@broadcom.com&gt;
Cc: Sumanesh Samanta &lt;sumanesh.samanta@broadcom.com&gt;
Cc: Ewan D. Milne &lt;emilne@redhat.com&gt;
Tested-by: Sumanesh Samanta &lt;sumanesh.samanta@broadcom.com&gt;
Reviewed-by: Hannes Reinecke &lt;hare@suse.de&gt;
Signed-off-by: Ming Lei &lt;ming.lei@redhat.com&gt;
Signed-off-by: Martin K. Petersen &lt;martin.petersen@oracle.com&gt;
</content>
</entry>
<entry>
<title>scsi: sbitmap: Move allocation hint into sbitmap</title>
<updated>2021-03-04T22:36:59Z</updated>
<author>
<name>Ming Lei</name>
<email>ming.lei@redhat.com</email>
</author>
<published>2021-01-22T02:33:08Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=c548e62bcf6adc7066ff201e9ecc88e536dd8890'/>
<id>urn:sha1:c548e62bcf6adc7066ff201e9ecc88e536dd8890</id>
<content type='text'>
Allocation hint should have belonged to sbitmap. Also, when sbitmap's depth
is high and there is no need to use mulitple wakeup queues, user can
benefit from percpu allocation hint too.

Move allocation hint into sbitmap, then SCSI device queue can benefit from
allocation hint when converting to plain sbitmap.

Convert vhost/scsi.c to use sbitmap allocation with percpu alloc hint. This
is more efficient than the previous approach.

Link: https://lore.kernel.org/r/20210122023317.687987-5-ming.lei@redhat.com
Cc: Omar Sandoval &lt;osandov@fb.com&gt;
Cc: Kashyap Desai &lt;kashyap.desai@broadcom.com&gt;
Cc: Sumanesh Samanta &lt;sumanesh.samanta@broadcom.com&gt;
Cc: Ewan D. Milne &lt;emilne@redhat.com&gt;
Cc: Mike Christie &lt;michael.christie@oracle.com&gt;
Cc: virtualization@lists.linux-foundation.org
Tested-by: Sumanesh Samanta &lt;sumanesh.samanta@broadcom.com&gt;
Reviewed-by: Hannes Reinecke &lt;hare@suse.de&gt;
Signed-off-by: Ming Lei &lt;ming.lei@redhat.com&gt;
Signed-off-by: Martin K. Petersen &lt;martin.petersen@oracle.com&gt;
</content>
</entry>
<entry>
<title>scsi: sbitmap: Maintain allocation round_robin in sbitmap</title>
<updated>2021-03-04T22:36:59Z</updated>
<author>
<name>Ming Lei</name>
<email>ming.lei@redhat.com</email>
</author>
<published>2021-01-22T02:33:06Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=efe1f3a1d5833c0ddd61ee50dbef8908f65a0a5e'/>
<id>urn:sha1:efe1f3a1d5833c0ddd61ee50dbef8908f65a0a5e</id>
<content type='text'>
Currently the allocation round_robin info is maintained by sbitmap_queue.

However, bit allocation really belongs to sbitmap. Move it there.

Link: https://lore.kernel.org/r/20210122023317.687987-3-ming.lei@redhat.com
Cc: Omar Sandoval &lt;osandov@fb.com&gt;
Cc: Kashyap Desai &lt;kashyap.desai@broadcom.com&gt;
Cc: Sumanesh Samanta &lt;sumanesh.samanta@broadcom.com&gt;
Cc: Ewan D. Milne &lt;emilne@redhat.com&gt;
Cc: Hannes Reinecke &lt;hare@suse.de&gt;
Cc: virtualization@lists.linux-foundation.org
Tested-by: Sumanesh Samanta &lt;sumanesh.samanta@broadcom.com&gt;
Reviewed-by: Hannes Reinecke &lt;hare@suse.de&gt;
Signed-off-by: Ming Lei &lt;ming.lei@redhat.com&gt;
Signed-off-by: Martin K. Petersen &lt;martin.petersen@oracle.com&gt;
</content>
</entry>
<entry>
<title>scsi: sbitmap: Remove sbitmap_clear_bit_unlock</title>
<updated>2021-03-04T22:36:59Z</updated>
<author>
<name>Ming Lei</name>
<email>ming.lei@redhat.com</email>
</author>
<published>2021-01-22T02:33:05Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=4ec591790356f0e5a95f8d278b0cfd04aea2ae52'/>
<id>urn:sha1:4ec591790356f0e5a95f8d278b0cfd04aea2ae52</id>
<content type='text'>
No one uses this helper any more, so kill it.

Link: https://lore.kernel.org/r/20210122023317.687987-2-ming.lei@redhat.com
Cc: Omar Sandoval &lt;osandov@fb.com&gt;
Cc: Kashyap Desai &lt;kashyap.desai@broadcom.com&gt;
Cc: Sumanesh Samanta &lt;sumanesh.samanta@broadcom.com&gt;
Cc: Ewan D. Milne &lt;emilne@redhat.com&gt;
Cc: Hannes Reinecke &lt;hare@suse.de&gt;
Tested-by: Sumanesh Samanta &lt;sumanesh.samanta@broadcom.com&gt;
Reviewed-by: Hannes Reinecke &lt;hare@suse.de&gt;
Reviewed-by: Johannes Thumshirn &lt;johannes.thumshirn@wdc.com&gt;
Signed-off-by: Ming Lei &lt;ming.lei@redhat.com&gt;
Signed-off-by: Martin K. Petersen &lt;martin.petersen@oracle.com&gt;
</content>
</entry>
<entry>
<title>sbitmap: remove swap_lock</title>
<updated>2020-12-08T00:12:49Z</updated>
<author>
<name>Pavel Begunkov</name>
<email>asml.silence@gmail.com</email>
</author>
<published>2020-11-22T15:35:46Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=661d4f55a79483aee4970a76e3bd9d4cdc74ac79'/>
<id>urn:sha1:661d4f55a79483aee4970a76e3bd9d4cdc74ac79</id>
<content type='text'>
map-&gt;swap_lock protects map-&gt;cleared from concurrent modification,
however sbitmap_deferred_clear() is already atomically drains it, so
it's guaranteed to not loose bits on concurrent
sbitmap_deferred_clear().

A one threaded tag heavy test on top of nullbk showed ~1.5% t-put
increase, and 3% -&gt; 1% cycle reduction of sbitmap_get() according to perf.

Signed-off-by: Pavel Begunkov &lt;asml.silence@gmail.com&gt;
Signed-off-by: Jens Axboe &lt;axboe@kernel.dk&gt;
</content>
</entry>
<entry>
<title>sbitmap: Delete sbitmap_any_bit_clear()</title>
<updated>2019-11-13T19:50:40Z</updated>
<author>
<name>John Garry</name>
<email>john.garry@huawei.com</email>
</author>
<published>2019-11-13T17:27:22Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=708edafa883186f55b24fa0c380242b5282f9105'/>
<id>urn:sha1:708edafa883186f55b24fa0c380242b5282f9105</id>
<content type='text'>
Since the only caller of this function has been deleted, delete this one
also.

Signed-off-by: John Garry &lt;john.garry@huawei.com&gt;
Signed-off-by: Jens Axboe &lt;axboe@kernel.dk&gt;
</content>
</entry>
<entry>
<title>treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 328</title>
<updated>2019-06-05T15:37:06Z</updated>
<author>
<name>Thomas Gleixner</name>
<email>tglx@linutronix.de</email>
</author>
<published>2019-05-29T23:57:42Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=0fc479b1ad6358d2440faf79a43d422065b77dc0'/>
<id>urn:sha1:0fc479b1ad6358d2440faf79a43d422065b77dc0</id>
<content type='text'>
Based on 1 normalized pattern(s):

  this program is free software you can redistribute it and or modify
  it under the terms of the gnu general public license v2 as published
  by the free software foundation this program is distributed in the
  hope that it will be useful but without any warranty without even
  the implied warranty of merchantability or fitness for a particular
  purpose see the gnu general public license for more details you
  should have received a copy of the gnu general public license along
  with this program if not see https www gnu org licenses

extracted by the scancode license scanner the SPDX license identifier

  GPL-2.0-only

has been chosen to replace the boilerplate/reference in 2 file(s).

Signed-off-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Reviewed-by: Alexios Zavras &lt;alexios.zavras@intel.com&gt;
Reviewed-by: Armijn Hemel &lt;armijn@tjaldur.nl&gt;
Reviewed-by: Kate Stewart &lt;kstewart@linuxfoundation.org&gt;
Reviewed-by: Allison Randal &lt;allison@lohutok.net&gt;
Cc: linux-spdx@vger.kernel.org
Link: https://lkml.kernel.org/r/20190530000435.923873561@linutronix.de
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>sbitmap: trivial - update comment for sbitmap_deferred_clear_bit</title>
<updated>2019-03-22T17:01:02Z</updated>
<author>
<name>Shenghui Wang</name>
<email>shhuiw@foxmail.com</email>
</author>
<published>2019-03-16T08:24:37Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=1e4471e74c75acb3f89959ffa02a241227937ae2'/>
<id>urn:sha1:1e4471e74c75acb3f89959ffa02a241227937ae2</id>
<content type='text'>
"sbitmap_batch_clear" should be "sbitmap_deferred_clear"

Acked-by: Omar Sandoval &lt;osandov@fb.com&gt;
Signed-off-by: Shenghui Wang &lt;shhuiw@foxmail.com&gt;
Signed-off-by: Jens Axboe &lt;axboe@kernel.dk&gt;
</content>
</entry>
</feed>
