Thread (2 messages) 2 messages, 2 authors, 2008-08-05

Re: [PATCH] fb: convert lock/unlock_kernel() into local fb mutex

flat view

From: Andrew Morton <akpm@linux-foundation.org>
Date: 2008-08-05 09:01:10

On Tue, 5 Aug 2008 07:37:55 +0200 Krzysztof Helt [off-list ref] wrote:
From: Krzysztof Helt <redacted>

Change lock_kernel()/unlock_kernel() to local fb mutex.
Each frame buffer instance has its own mutex.

The one line try_to_load() function is unrolled to
request_module() in two places for readability.

Signed-off-by: Krzysztof Helt <redacted>
---

The only caveat is that I had to put request_module()
call outside this new mutex while it was inside the 
lock_kernel() (inside fb_open()). 
Why did you have to do that?

The request_module() in fb_ioctl() is inside the lock...
If the request_module() should be called only inside this mutex
please drop the patch.
No, request_module() doesn't need lock_kernel().

The only possible problem I can see is the sole remaining lock_kernel()
in drivers/video/console/vgacon.c.  The fbcon.c code used to be
serialised against vgacon_do_font_op() via lock_kernel, but with this
change vgacon_do_font_op() can now run concurrently with all the code
which you've put inside fb_info.mutex_lock.  Probably not a problem, but
please check that sometime.

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help