lkml.org 
[lkml]   [2001]   [Mar]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: lock_kernel() usage and sync_*() functions
Date
In article <Pine.LNX.4.05.10103211901070.705-100000@cosmic.nrg.org>,
Nigel Gamble <nigel@nrg.org> wrote:
>
>Why is the kernel lock held around sync_supers() and sync_inodes() in
>sync_old_buffers() and fsync_dev(), but not in sync_dev()? Is it just
>to serialize calls to these functions, or is there some other reason?

A lot of the FS locks need the kernel lock and are not SMP-safe on their
own. Look at "lock_super()" for the worst offender (I think most of the
other ones have been converted to properly lock on SMP).

sync_inodes() _shouldn't_ need it. sync_supers() definitely does.

The fact that sync_dev() doesn't get the kernel lock looks worrisome.
Of course, I don't think much of anything actually _uses_ "sync_dev()"
anyway (quick grep shows it up in revalidate, which gets the kernel lock
earlier)

But it might be a good idea to try to (a) remove the bkl from the
functions, and push it down into sync_supers() that definitely needs it
now (and remove it when it doesn't any more).

The long-term plan (ie 2.5.x) is to basically remove the bkl from all
the VFS interfaces. For 2.4.x, only the truly performance-critical stuff
was done (ie mainly name lookup and read/write page).

Linus
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:29    [W:0.035 / U:0.084 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site