All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@linux-foundation.org>
To: Krzysztof Helt <krzysztof.h1@poczta.fm>
Cc: Linux-fbdev-devel <linux-fbdev-devel@lists.sourceforge.net>
Subject: Re: [PATCH] fb: convert lock/unlock_kernel() into local fb mutex
Date: Tue, 5 Aug 2008 02:00:29 -0700	[thread overview]
Message-ID: <20080805020029.dfd783de.akpm@linux-foundation.org> (raw)
In-Reply-To: <20080805073755.bb8d5c8c.krzysztof.h1@poczta.fm>

On Tue, 5 Aug 2008 07:37:55 +0200 Krzysztof Helt <krzysztof.h1@poczta.fm> wrote:

> From: Krzysztof Helt <krzysztof.h1@wp.pl>
> 
> 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 <krzysztof.h1@wp.pl>
> ---
> 
> 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=/

  reply	other threads:[~2008-08-05  9:01 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-08-05  5:37 [PATCH] fb: convert lock/unlock_kernel() into local fb mutex Krzysztof Helt
2008-08-05  9:00 ` Andrew Morton [this message]
  -- strict thread matches above, loose matches on Subject: below --
2008-08-05 10:07 krzysztof.h1
2008-08-05 16:04 ` Andrew Morton

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20080805020029.dfd783de.akpm@linux-foundation.org \
    --to=akpm@linux-foundation.org \
    --cc=krzysztof.h1@poczta.fm \
    --cc=linux-fbdev-devel@lists.sourceforge.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.