mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: John Levon <levon@movementarian.org>
To: linux-kernel@vger.kernel.org
Cc: willy@debian.org
Subject: Re: flock(fd, LOCK_UN) taking 500ms+ ?
Date: Wed, 2 Oct 2002 04:23:27 +0100	[thread overview]
Message-ID: <20021002032327.GA91947@compsoc.man.ac.uk> (raw)
In-Reply-To: <20021002023901.GA91171@compsoc.man.ac.uk>

On Wed, Oct 02, 2002 at 03:39:01AM +0100, John Levon wrote:

> Unlock, took 541386 usecs

Hmm. This :

--- linux-linus/fs/locks.c	Sat Sep 28 15:56:28 2002
+++ linux/fs/locks.c	Wed Oct  2 04:15:54 2002
@@ -727,11 +727,11 @@
 	}
 	unlock_kernel();
 
-	if (found)
-		yield();
-
 	if (new_fl->fl_type == F_UNLCK)
 		return 0;
+
+	if (found)
+		yield();
 
 	lock_kernel();
 	for_each_lock(inode, before) {

"fixes" the problem (a simultaneous kernel compile is going on; it's a
2-way SMP machine). What is the yield for ? What's the right fix (if
any) ? This turns our app's main loop from a second or two into a
90-second behemoth.

There are no other apps taking locks on the relevant files, btw

regards
john

-- 
"I never understood what's so hard about picking a unique
 first and last name - and not going beyond the 6 character limit."
 	- Toon Moene

  reply	other threads:[~2002-10-02  3:18 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-10-02  2:39 John Levon
2002-10-02  3:23 ` John Levon [this message]
2002-10-02 13:14   ` Matthew Wilcox
2002-10-02 17:04     ` Andrew Morton
2002-10-02 18:30       ` Matthew Wilcox
2002-10-02 18:58         ` John Levon
2002-10-02 19:10           ` Robert Love
2002-10-02 19:21         ` Robert Love
2002-10-02 19:23         ` Andrew Morton
2002-10-02 20:05           ` Matthew Wilcox
2002-10-02 21:36 Manfred Spraul

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=20021002032327.GA91947@compsoc.man.ac.uk \
    --to=levon@movementarian.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=willy@debian.org \
    /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®