mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Trond Myklebust <trond.myklebust@fys.uio.no>
To: "Ananiev, Leonid I" <leonid.i.ananiev@intel.com>
Cc: Linux Kernel Mailing List <Linux-Kernel@vger.kernel.org>
Subject: RE: Postal 56% waits for flock_lock_file_wait
Date: Sun, 01 Oct 2006 13:18:12 -0400	[thread overview]
Message-ID: <1159723092.5645.14.camel@lade.trondhjem.org> (raw)
In-Reply-To: <B41635854730A14CA71C92B36EC22AAC3AD954@mssmsx411>

On Sun, 2006-10-01 at 20:53 +0400, Ananiev, Leonid I wrote:
> > The kernel would appear to be doing exactly what is expected of it.
> 
> Each of 16 user threads calls to open() one of 1000 files each 20 sec.
> 3000 calls per minute in sum.
> The open() sleeps.

According to your numbers, the call to flock() sleeps. Where do they
show a measurable sleep in open()?

> I'm not sure that users expected just of sleeping.

I still don't get it. The job of the flock() system call is to sleep if
someone already holds the lock, and then grab the lock when it is
released. If that is not what the user expects, then the user has the
option of not calling flock(). This has nothing to do with open().

Trond


> Leonid
> 
> -----Original Message-----
> From: Trond Myklebust [mailto:trond.myklebust@fys.uio.no] 
> Sent: Sunday, October 01, 2006 8:05 AM
> To: Ananiev, Leonid I
> Cc: Linux Kernel Mailing List
> Subject: RE: Postal 56% waits for flock_lock_file_wait
> 
> On Sat, 2006-09-30 at 21:26 +0400, Ananiev, Leonid I wrote:
> > > On which filesystem were the above results obtained if it was not
> > ext2?
> > The default ext3 fs was used.
> > 
> > > All the above results are telling you is that your test involves
> > several
> > > processes contending for the same lock, and so all of them barring
> the
> > > one process that actually holds the lock are idle.
> > 
> > Yes. It is  flock_lock_file_wait.
> 
> That is the function which causes the sleep, yes. So what is your gripe?
> The kernel would appear to be doing exactly what is expected of it.
> 
> Trond


  reply	other threads:[~2006-10-01 17:18 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-10-01 16:53 Ananiev, Leonid I
2006-10-01 17:18 ` Trond Myklebust [this message]
2006-10-02 16:57   ` Tim Chen
2006-10-02 17:11     ` Trond Myklebust
2006-10-02 17:51       ` Alan Cox
2006-10-02 17:40         ` Dave Jones
2006-10-02 22:00           ` Alan Cox
2006-10-02 21:40             ` Dave Jones
  -- strict thread matches above, loose matches on Subject: below --
2006-09-30 17:26 Ananiev, Leonid I
2006-10-01  4:05 ` Trond Myklebust
2006-09-30  5:25 Ananiev, Leonid I
2006-09-30 15:05 ` Trond Myklebust
2006-09-29 15:36 Ananiev, Leonid I

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=1159723092.5645.14.camel@lade.trondhjem.org \
    --to=trond.myklebust@fys.uio.no \
    --cc=Linux-Kernel@vger.kernel.org \
    --cc=leonid.i.ananiev@intel.com \
    /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

all inboxes | Powered by JetHome®