Re: [PATCH] scsi: ufs: Fix registers dump vops caused scheduling while atomic

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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.



[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [Linux for Sparc]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux