Re: GFS2 and DLM

From: Ingo Molnar
Date: Tue Jun 27 2006 - 06:37:59 EST



* Pekka Enberg <penberg@xxxxxxxxxxxxxx> wrote:

> On 6/27/06, Ingo Molnar <mingo@xxxxxxx> wrote:
> >and since XFS makes use of KM_SLEEP in 130+ callsites, that means it is
> >in essence using GFP_NOFAIL massively!
>
> Yup, it's not just a wrapper, XFS really has its own allocator and the
> PF_FSTRANS magic makes it hard to convert to slab proper.

AFAICS PF_FSTRANS is mostly just avoidance of having to pass the
__GFP_FS flag around:

if ((current->flags & PF_FSTRANS) || (flags & KM_NOFS))
lflags &= ~__GFP_FS;

Btw., this XFS way of handling PF_FSTRANS in a nested and letting it
translate into the clearing of __GFP_FS might just be the proper way of
doing it in other FS and IO code too?

Conceptually, it is really the property of the general task context that
it's "inside a filesystem transaction", not a property of the immediate
allocation callsite. I.e. we should transform all uses of GFP_NOFS into
PF_FSTRANS save-set/restore calls.

I'd not be surprised if that also fixed a couple of bugs: it's much more
robust and more maintainable to identify the codepaths that are a
filesystem operation than to identify all allocations (explicit or
implicit) in a codepath that is known to be a filesystem operation
(especially in a constantly evolving kernel).

Ingo
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/