Re: why lock_kernel for fput in 2.3.99-pre5?

From: Jonathan Case Nicklin (nicklin@missioncriticallinux.com)
Date: Mon Apr 17 2000 - 13:32:05 EST


ying@almaden.ibm.com wrote:

> Hi,
>
> I'm wondering if someone can give me some explanations on why putting
> lock_kernel() around fput() in
> binfmt_elf.c (and maybe somewhere else) in 2.3.99-pre5. It seems like
> whatever needs to be protected are already done within
> fput() function itself. I don't see why lock_kernel() is needed. Also, by
> making d_count atomic, it seems like one can get rid of
> lock kernel calls around all the dget()'s, if not anything else. Is this
> right?
>
> Ying
>
> -
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.rutgers.edu
> Please read the FAQ at http://www.tux.org/lkml/

Ying,
    The kernel lock wraps fput because it needs to "put" a dcache entry via
dput. At this point in time the directory / namei cache is gaurded by the
kernel lock. Also simply making the d_count access in dget atomic will not
allow you to remove the kernel lock.

-> however, I do have a SMP safe version of the dcache that I have been
working on and will release the patch in a couple of days...

sincerely,

Jonathan Case Nicklin
http://www.missioncriticallinux.com

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



This archive was generated by hypermail 2b29 : Sun Apr 23 2000 - 21:00:11 EST