lkml.org 
[lkml]   [2013]   [Aug]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH RFC 1/2] qspinlock: Introducing a 4-byte queue spinlock implementation
On 08/02/2013 01:40 AM, Peter Zijlstra wrote:
> On Thu, Aug 01, 2013 at 11:46:24PM +0530, Raghavendra K T wrote:
>> On 08/01/2013 11:28 PM, Waiman Long wrote:
>>> On 08/01/2013 05:40 AM, Peter Zijlstra wrote:
>>>> On Wed, Jul 31, 2013 at 10:37:10PM -0400, Waiman Long wrote:
>>>>
>> [...]
>>>>
>>>>> + */
>>>>> + for (qn_idx = 1; qn_idx< MAX_QNODES; qn_idx++) {
>>>>> + if (!node[qn_idx].used)
>>>>> + break;
>>>> }
>>>>
>>>>> + if (unlikely(qn_idx == MAX_QNODES)) {
>>>>> + /*
>>>>> + * This shouldn't happen, print a warning message
>>>>> + *& busy spinning on the lock.
>>>>> + */
>>>>> + pr_warn("qspinlock: queue node table exhausted at "
>>>>> + "cpu %d!\n", cpu_nr);
>>>> This could make your machine die hard.. not all contexts can printk().
>>>
>>> Do you have any suggestion? I could skip the warning and silently do the
>>> busy spinning. I just want some way to notify the user of this rare event.
>>
>> We have used debugfs in pv-spinlock to avoid that since printk uses
>> spinlock again. may be it will help to profile many other parts of
>> code too.
>
> I always use early_printk(), but that requires you set up your serial
> console properly and joe-user won't have done that.
>

Thanks Peter. Yes. this is more convenient.

/me remembers using early_printk during pvops patch debugging without
setting up serial console ;)



\
 
 \ /
  Last update: 2013-08-01 23:01    [W:0.037 / U:0.564 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site