lkml.org 
[lkml]   [2021]   [Jan]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v2 03/19] scsi: libsas: Introduce a _gfp() variant of event notifiers
On Tue, Jan 12, 2021 at 12:06:31PM +0100, Ahmed S. Darwish wrote:
> sas_alloc_event() uses in_interrupt() to decide which allocation should
> be used.
>
> The usage of in_interrupt() in drivers is phased out and Linus clearly
> requested that code which changes behaviour depending on context should
> either be separated or the context be conveyed in an argument passed by
> the caller, which usually knows the context.
>
> The in_interrupt() check is also only partially correct, because it
> fails to choose the correct code path when just preemption or interrupts
> are disabled. For example, as in the following call chain:

What is the problem with simply adding a gfp_t argument to the existing
calls? The end result of this series looks fine, but the way we get
there looks extremely cumbersome.

\
 
 \ /
  Last update: 2021-01-12 16:48    [W:0.354 / U:0.652 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site