lkml.org 
[lkml]   [2020]   [Feb]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH] scsi: ufs: Fix registers dump vops caused scheduling while atomic
From
Date
On 2/4/20 10:31 PM, Can Guo wrote:
> Do you mean by splitting ufshcd_print_host_regs() into two functions?
> One behaves identically same to the current function, another one called
> ufshcd_print_host_regs_nosleep(). No?

Hi Can,

Not really. I had something else in mind.

Having taken a closer look at ufs_qcom_dump_dbg_regs() I started
wondering why there are sleep statements in that function. Is the goal
of these sleep statements perhaps to reduce how often printk() is
called? Has it been considered to remove all sleep calls from
ufs_qcom_dump_dbg_regs() and instead add something like the following at
the start of that function:

static DEFINE_RATELIMIT_STATE(_rs,
DEFAULT_RATELIMIT_INTERVAL,
DEFAULT_RATELIMIT_BURST);

if (!__ratelimit(&_rs))
return;


Thanks,

Bart.

\
 
 \ /
  Last update: 2020-02-05 23:46    [W:0.055 / U:8.752 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site