Linux NFS development
 help / color / mirror / Atom feed
From: "Jose R. Santos" <jrsantos@austin.ibm.com>
To: nfs@lists.sourceforge.net, neilb@cse.unsw.edu.au
Subject: Re: BKL removal from find_exported_dentry()
Date: Tue, 16 Mar 2004 10:30:08 -0600	[thread overview]
Message-ID: <20040316163008.GS4972@rx8.ibm.com> (raw)
In-Reply-To: <20040311211020.GA1296@rx8.ibm.com> (from jrsantos@austin.ibm.com on Thu, Mar 11, 2004 at 15:10:20 -0600)

On 03/11/04 15:10:20, Jose R. Santos wrote:
> Looking at the code it seems there is a possibility of racing if directories
> get rename or remove, but BKL doesn't seem to protect against these races, it
> may slow down thing a bit to avoid them though.

After looking at this even further, I'm starting to get the impression that the
BKL is there in order to protect against filesystems that behave badly.  I guess
this is the price for code portability across many filesystems.

Could a better choice to fix this issue be to implementing the get_dentry() for 
each filesystem and making sure that it almost always returns a connected dentry?
Filesystems that don't implement it would just use the generic op. 

I also have concerns about seeing this on busy SMP machines with relative small 
amounts of memory and several NFS exports with very deep directories.

> I'm attaching a patch that removes BKL from find_exported_dentry().  I see a 
> huge improvement on SpecSFS benchmark and haven't seen any failure up to date.

While reduces the time spent on find_exported_dentry() from 75% to less than 1%,
it seems that this may not be a very popular approach.  Guess I should have done 
my homework about the BKL removal subject before posting. :)

I am really interested in knowing if the BKL is there to protect against bad 
filesystem or if its there for other reasons.

Thanks

-JRS




-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click
_______________________________________________
NFS maillist  -  NFS@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nfs

  reply	other threads:[~2004-03-16 16:28 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-03-09 13:54 BKL removal from find_exported_dentry() Jose R. Santos
2004-03-11 21:10 ` Jose R. Santos
2004-03-16 16:30   ` Jose R. Santos [this message]
2004-03-16 22:58     ` Neil Brown

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=20040316163008.GS4972@rx8.ibm.com \
    --to=jrsantos@austin.ibm.com \
    --cc=neilb@cse.unsw.edu.au \
    --cc=nfs@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox