Re: [PATCH 2/2 v3] mm/compaction: Disable compact_unevictable_allowed on RT

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

 



On 3/4/20 12:56 AM, Andrew Morton wrote:
>> @@ -2572,6 +2577,26 @@ int proc_dointvec(struct ctl_table *table, int write,
>>  	return do_proc_dointvec(table, write, buffer, lenp, ppos, NULL, NULL);
>>  }
>>  
>> +#ifdef CONFIG_COMPACTION
>> +static int proc_dointvec_warn_RT_change(struct ctl_table *table, int write,
>> +					void __user *buffer, size_t *lenp,
>> +					loff_t *ppos)
>> +{
>> +	int ret, old;
>> +
>> +	if (!IS_ENABLED(CONFIG_PREEMPT_RT) || !write)
>> +		return proc_dointvec(table, write, buffer, lenp, ppos);
>> +
>> +	old = *(int *)table->data;
>> +	ret = proc_dointvec(table, write, buffer, lenp, ppos);
>> +	if (ret)
>> +		return ret;
>> +	WARN_ONCE(old != *(int *)table->data, "sysctl attribute %s changed.",
>> +		  table->procname);
> 
> The WARN will include a stack trace which just isn't interesting.  A
> pr_warn() would be better?

Yeah, the only interesting part of full WARN would possibly be, which process
changed it. That might be useful to print.

>> +	return ret;
>> +}
>> +#endif
> 





[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux