lkml.org 
[lkml]   [2023]   [Mar]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
Subjectcpumask emergency fixes pushed out
Just a note to people involved in the multiple different threads that
I did a "quick fix" push of the verified fix for the random.c issue.

I still think that the lpfc driver in particular could be cleaned up,
and considering that the random.c use-case looks like it really wants
the same thing ("give me the next cpu, but wrap to the beginning if
that fails") I wonder if we should just have a generic helper for that
case.

The existing "cpumask_next_wrap()" function does do pretty much
exactly that, you just have to give it some unusual arguments. It *is*
used, but it's an odd enough interface that I'm not really sure that
I'm a huge fan of it.

Somewhat ironically, the native bitmap version
("find_next_bit_wrap()") does *not* have that ugly interface, and is
fairly straightforward. So it's really just the cpumask version that
has that extension that makes it so non-intuitive.

Anyway, I did that quick fix commit, but I do hope that people take a
look at those fixes for maybe doing things better. And if somebody
finds other not-quite-as obvious cases of that incorrect pattern of
checking a bit scanning function for 'nr_cpumask_bits', please holler.

Linus

\
 
 \ /
  Last update: 2023-03-27 00:46    [W:0.035 / U:0.372 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site