All of lore.kernel.org
 help / color / mirror / Atom feed
From: Chris Mason <mason@suse.com>
To: John Dalbec <jpdalbec@ysu.edu>
Cc: reiserfs-list@namesys.com
Subject: Re: Trying to port data-logging to RH 2.4.18-19.7.x kernel
Date: 31 Jan 2003 11:06:05 -0500	[thread overview]
Message-ID: <1044029165.15685.226.camel@tiny.suse.com> (raw)
In-Reply-To: <3E3A99A1.2010600@ysu.edu>

On Fri, 2003-01-31 at 10:43, John Dalbec wrote:
> Chris Mason wrote:
> > On Fri, 2003-01-31 at 09:41, John Dalbec wrote:
> > 
> >>I'm trying to port Chris's data-logging patches to the Red Hat 
> >>2.4.18-19.7.x kernel.  My first effort works fine on my workstation with 
> >>ReiserFS and NFS, but not on the production server:
> >>
> >>
> >>>Jan 31 05:47:28 mail03 kernel: search_by_key called without kernel lock held
> >>
> > 
> > This is a debugging check that shows our search_by_key function was
> > called without first taking the big kernel lock, and the trace below
> > shows it happened during a call to reiserfs_read_inode2.  So, what you
> > need to do is put lock_kernel() calls into reiserfs_read_inode2, or more
> > likely into reiserfs_lookup.
> 
> I don't see reiserfs_lookup in the stack trace, and it already calls 
> reiserfs_check_lock_depth.  Why would I need lock_kernel there?
> Red Hat's low-latency patch puts a conditional_schedule at the top of 
> search_by_key.  Would that cause the kernel lock to be dropped?  I see
> /* The function is NOT SCHEDULE-SAFE! */
> 

Must be the iget4 path then, probably triggered by nfs.  The locking
rules say the BKL is supposed to be held when you call read_inode.  The
fix would either to be finding the caller or just adding lock_kernel
calls to reiserfs_read_inode2.  It is safe to nest them, so adding them
won't cause problems.

The BKL is dropped during a schedule, but taken again before returning
control to the calling function, so that low latency patch probably
isn't causing problems.  I'm assuming they are using Andrew Morton's low
latency patch, which doesn't cause problems.

-chris



  reply	other threads:[~2003-01-31 16:06 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-01-31 14:41 Trying to port data-logging to RH 2.4.18-19.7.x kernel John Dalbec
2003-01-31 14:55 ` Chris Mason
2003-01-31 15:43   ` John Dalbec
2003-01-31 16:06     ` Chris Mason [this message]
2003-01-31 21:28       ` John Dalbec
2003-02-03 16:41         ` Chris Mason
2003-02-04 18:01           ` John Dalbec
2003-02-05 14:24           ` John Dalbec
2003-02-05 16:00             ` Chris Mason

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=1044029165.15685.226.camel@tiny.suse.com \
    --to=mason@suse.com \
    --cc=jpdalbec@ysu.edu \
    --cc=reiserfs-list@namesys.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.