Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1239860

Re: linux-next: kernel BUG at mm/slub.c:1447!

From Andrew Morton <akpm@linux-foundation.org>
Newsgroups linux.kernel
Subject Re: linux-next: kernel BUG at mm/slub.c:1447!
Date 2015-10-05 21:30 +0200
Message-ID <qgjCp-8dv-3@gated-at.bofh.it> (permalink)
References <qeOAG-15a-11@gated-at.bofh.it> <qeSXD-7fI-9@gated-at.bofh.it> <qf2X1-50d-23@gated-at.bofh.it> <qffAS-6a6-5@gated-at.bofh.it> <qgejo-uJ-15@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Mon, 5 Oct 2015 15:47:13 +0200 Michal Hocko <mhocko@kernel.org> wrote:

> > The fourth best way of fixing this is a nasty short-term bodge, such a
> > the one you just sent ;) But if we're going to do this, it should be
> > the minimal bodge which fixes this deadlock.  Is it possible to come up
> > with a one-liner (plus suitable comment) to get us out of this mess?
> 
> Yes I do agree that the fix I am proposing is short-term but this seems
> like the easiest way to go for stable and older kernels that might be
> affected. I thought your proposal for mapping_gfp_constraint was exactly
> to have all such places annotated for an easier future transition to
> something more reasonable.

hm, OK, let's go that way.  But I expect this mess will continue to
float around for a long time - fixing it nicely will be somewhat
intrusive.

> > Longer-term I suggest we look at generalising the memalloc_noio_foo()
> > stuff so as to permit callers to mask off (ie: zero) __GFP_ flags in
> > callees.  I have a suspicion we should have done this 15 years ago
> > (which is about when I started wanting to do it).
> 
> I am not sure memalloc_noio_foo is a huge win. It is an easy hack where
> the whole allocation transaction is clear - like in the PM code. I am
> not sure this is true also for the FS.

mm..  I think it'll work out OK - a set/restore around particular
callsites.

It might get messy in core MM though.  Do we apply current->mask at the
very low levels of the page allocator?  If so, that might muck up
intermediate callers who are peeking into specific gfp_t flags.

Perhaps it would be better to apply the mask at the highest possible
level: wherever a function which was not passed a gfp_t decides to
create one.  Basically a grep for "GFP_".  But then we need to decide
*which* gfp_t-creators need the treatment.  All of them (yikes) or is
this mechanism only for called-via-address_space_operations code?  That
might work.

Maybe it would be better to add the gfp_t argument to the
address_space_operations.  At a minimum, writepage(), readpage(),
writepages(), readpages().  What a pickle.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

linux-next: kernel BUG at mm/slub.c:1447! Guenter Roeck <linux@roeck-us.net> - 2015-10-01 18:10 +0200
  Re: linux-next: kernel BUG at mm/slub.c:1447! Christoph Lameter <cl@linux.com> - 2015-10-01 19:00 +0200
  Re: linux-next: kernel BUG at mm/slub.c:1447! Andrew Morton <akpm@linux-foundation.org> - 2015-10-01 22:50 +0200
    Re: linux-next: kernel BUG at mm/slub.c:1447! Michal Hocko <mhocko@kernel.org> - 2015-10-02 09:30 +0200
      Re: linux-next: kernel BUG at mm/slub.c:1447! Michal Hocko <mhocko@kernel.org> - 2015-10-02 11:00 +0200
      Re: linux-next: kernel BUG at mm/slub.c:1447! Andrew Morton <akpm@linux-foundation.org> - 2015-10-02 23:00 +0200
        Re: linux-next: kernel BUG at mm/slub.c:1447! Michal Hocko <mhocko@kernel.org> - 2015-10-05 15:50 +0200
          Re: linux-next: kernel BUG at mm/slub.c:1447! Andrew Morton <akpm@linux-foundation.org> - 2015-10-05 21:30 +0200
            Re: linux-next: kernel BUG at mm/slub.c:1447! Andrew Morton <akpm@linux-foundation.org> - 2015-10-06 04:10 +0200
              Re: linux-next: kernel BUG at mm/slub.c:1447! Dave Chinner <david@fromorbit.com> - 2015-10-06 07:20 +0200
    Re: linux-next: kernel BUG at mm/slub.c:1447! Guenter Roeck <linux@roeck-us.net> - 2015-10-02 15:40 +0200
      Re: linux-next: kernel BUG at mm/slub.c:1447! Michal Hocko <mhocko@kernel.org> - 2015-10-02 15:50 +0200

csiph-web