mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Anton Altaparmakov <aia21@cam.ac.uk>
To: Nick Piggin <nickpiggin@yahoo.com.au>
Cc: Andrew Morton <akpm@osdl.org>,
	eike-kernel@sf-tec.de, linux-kernel@vger.kernel.org,
	aia21@cantab.net
Subject: Re: [BUG?] possible recursive locking detected
Date: Thu, 27 Jul 2006 10:35:28 +0100	[thread overview]
Message-ID: <1153992928.21849.41.camel@imp.csi.cam.ac.uk> (raw)
In-Reply-To: <44C884EF.6010705@yahoo.com.au>

On Thu, 2006-07-27 at 19:18 +1000, Nick Piggin wrote:
> Anton Altaparmakov wrote:
> > On Thu, 2006-07-27 at 00:38 -0700, Andrew Morton wrote:
> > 
> >>On Thu, 27 Jul 2006 08:15:27 +0100
> >>Anton Altaparmakov <aia21@cam.ac.uk> wrote:
> >>
> >>
> >>>>I'm surprised ext2 is allocating with __GFP_FS set, though. Would that
> >>>>cause any problem?
> >>>
> >>>That is an ext2 bug IMO.
> >>
> >>There is no bug.
> >>
> >>What there is is an ill-defined set of rules.  If we want to tighten these
> >>rules we have a choice between
> > 
> > 
> > I beg to differ.  It is a bug.  You cannot reenter the file system when
> > the file system is trying to allocate memory.  Otherwise you can never
> > allocate memory with any locks held or you are bound to introduce an
> > A->B B->A deadlock somewhere.
> 
> I don't think it is a bug in general. It really depends on the allocation:
> 
> - If it is a path that might be required in order to writeout a page, then
> yes GFP_NOFS is going to help prevent deadlocks.
> 
> - If it is a path where you'll take the same locks as page reclaim requires,
> then again GFP_NOFS is required.
> 
> For NTFS case, it seems like holding i_mutex on the write path falls foul
> of the second problem. But I agree with Andrew that this is a critical case
> where we do have to enter the fs. GFP_NOFS is too big a hammer to use.
> 
> I guess you'd have to change NTFS to do something sane privately, or come
> up with a nice general solution that doesn't harm the common filesystems
> that apparently don't have a problem here... can you just add GFP_NOFS to
> NTFS's mapping_gfp_mask to start with?

I don't think NTFS has a problem either.  It is a theoretical problem
with an extremely small chance of being hit.  I am happy to have such a
problem for now.  There are more pressing problems to solve.  The only
thing that needs to happen is for the messages to stop so people stop
complaining / getting worried about them...

Best regards,

        Anton
-- 
Anton Altaparmakov <aia21 at cam.ac.uk> (replace at with @)
Unix Support, Computing Service, University of Cambridge, CB2 3QH, UK
Linux NTFS maintainer / IRC: #ntfs on irc.freenode.net
WWW: http://www.linux-ntfs.org/ & http://www-stu.christs.cam.ac.uk/~aia21/


  reply	other threads:[~2006-07-27  9:35 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-07-26 16:05 Rolf Eike Beer
2006-07-27  5:53 ` Andrew Morton
2006-07-27  6:51   ` Nick Piggin
2006-07-27  7:15     ` Anton Altaparmakov
2006-07-27  7:38       ` Andrew Morton
2006-07-27  8:19         ` Anton Altaparmakov
2006-07-27  8:53           ` Andrew Morton
2006-07-27  9:28             ` Anton Altaparmakov
2006-07-27  9:46               ` Ingo Molnar
2006-07-27 14:31                 ` Anton Altaparmakov
2006-07-27 14:45                   ` Ingo Molnar
2006-07-27 18:04                     ` Andrew Morton
2006-07-27  9:18           ` Nick Piggin
2006-07-27  9:35             ` Anton Altaparmakov [this message]
2006-07-27 10:02               ` Nick Piggin
2006-07-27 12:30                 ` Anton Altaparmakov
2006-07-27  7:24     ` Andrew Morton
2006-07-27  7:29   ` Arjan van de Ven

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=1153992928.21849.41.camel@imp.csi.cam.ac.uk \
    --to=aia21@cam.ac.uk \
    --cc=aia21@cantab.net \
    --cc=akpm@osdl.org \
    --cc=eike-kernel@sf-tec.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=nickpiggin@yahoo.com.au \
    /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®