lkml.org 
[lkml]   [2016]   [Feb]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v2] lock/semaphore: Avoid an unnecessary deadlock within up()
On (02/03/16 08:28), Ingo Molnar wrote:
[..]
> So why not move printk away from semaphores? Semaphores are classical constructs
> that have legacies and are somewhat non-obvious to use, compared to modern,
> simpler locking primitives. I'd not touch their implementation, unless we are
> absolutely sure this is a safe optimization.

semaphore's spin_lock is not the only spin lock that printk acquires. it also takes the
logbuf_lock (and different locks in console drivers (up to console driver)).

Jan Kara posted a patch that offloads printing job (console_trylock()-console_unlock())
from printk() call (when printk can offload it). so semaphore and console driver's locks
will go away (mostly) with Jan's patch. logbug spin_lock, however, will stay.

-ss

\
 
 \ /
  Last update: 2016-02-03 09:21    [W:0.046 / U:0.768 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site