Re: vmalloc with GFP_NOFS

2018-07-17 Thread Michal Hocko
On Tue 24-04-18 14:35:36, Theodore Ts'o wrote: > On Tue, Apr 24, 2018 at 10:27:12AM -0600, Michal Hocko wrote: > > fs/ext4/xattr.c > > > > What to do about this? Well, there are two things. Firstly, it would be > > really great to double check whether the GFP_NOFS is really needed. I > > cannot ju

Re: vmalloc with GFP_NOFS

2018-05-10 Thread Michal Hocko
On Thu 10-05-18 07:58:25, Michal Hocko wrote: > On Wed 09-05-18 15:02:31, Darrick J. Wong wrote: > > On Wed, May 09, 2018 at 11:04:47PM +0200, Michal Hocko wrote: > > > On Wed 09-05-18 08:13:51, Darrick J. Wong wrote: > [...] > > > > > FS resp. IO submitting code paths have to be careful when alloc

Re: vmalloc with GFP_NOFS

2018-05-09 Thread Michal Hocko
On Wed 09-05-18 15:02:31, Darrick J. Wong wrote: > On Wed, May 09, 2018 at 11:04:47PM +0200, Michal Hocko wrote: > > On Wed 09-05-18 08:13:51, Darrick J. Wong wrote: [...] > > > > FS resp. IO submitting code paths have to be careful when allocating > > > > > > Not sure what 'FS resp. IO' means her

Re: vmalloc with GFP_NOFS

2018-05-09 Thread Darrick J. Wong
_IO from the > > > given > > > mask so no memory allocation can recurse back in the FS/IO. > > > > > > FS/IO code then simply calls the appropriate save function right at > > > the layer where a lock taken from the reclaim context (e.g. shrinker) > >

Re: vmalloc with GFP_NOFS

2018-05-09 Thread Michal Hocko
On Wed 09-05-18 19:24:51, Mike Rapoport wrote: > On Wed, May 09, 2018 at 08:13:51AM -0700, Darrick J. Wong wrote: > > On Wed, May 09, 2018 at 03:42:22PM +0200, Michal Hocko wrote: [...] > > > FS/IO code then simply calls the appropriate save function right at > > > the layer where a lock taken from

Re: vmalloc with GFP_NOFS

2018-05-09 Thread Michal Hocko
t; > > FS/IO code then simply calls the appropriate save function right at > > the layer where a lock taken from the reclaim context (e.g. shrinker) > > is taken and the corresponding restore function when the lock is > > released. All that ideally along with an explanation what i

Re: vmalloc with GFP_NOFS

2018-05-09 Thread Mike Rapoport
ke the second "is taken" got there by mistake > > released. All that ideally along with an explanation what is the reclaim > > context for easier maintenance. > > > > What about __vmalloc(GFP_NOFS) > > == > > > > vmalloc

Re: vmalloc with GFP_NOFS

2018-05-09 Thread Darrick J. Wong
ntenance. > > What about __vmalloc(GFP_NOFS) > == > > vmalloc doesn't support GFP_NOFS semantic because there are hardcoded > GFP_KERNEL allocations deep inside the allocator which are quit non-trivial ...which are quite non-trivial... > to fi

Re: vmalloc with GFP_NOFS

2018-05-09 Thread David Sterba
On Wed, May 09, 2018 at 03:42:22PM +0200, Michal Hocko wrote: > On Tue 24-04-18 13:25:42, Michal Hocko wrote: > [...] > > > As a suggestion, could you take > > > documentation about how to convert to the memalloc_nofs_{save,restore} > > > scope api (which I think you've written about e-mails at len

Re: vmalloc with GFP_NOFS

2018-05-09 Thread Michal Hocko
is the reclaim context for easier maintenance. What about __vmalloc(GFP_NOFS) == vmalloc doesn't support GFP_NOFS semantic because there are hardcoded GFP_KERNEL allocations deep inside the allocator which are quit non-trivial to fix up. That means that calling ``v

Re: vmalloc with GFP_NOFS

2018-04-25 Thread Michal Hocko
On Wed 25-04-18 11:25:09, Mikulas Patocka wrote: > > > On Wed, 25 Apr 2018, Michal Hocko wrote: > > > On Wed 25-04-18 08:43:32, Mikulas Patocka wrote: > > > > > > > > > On Tue, 24 Apr 2018, Michal Hocko wrote: > > > > > > > On Tue 24-04-18 19:17:12, Mikulas Patocka wrote: > > > > > > > > > >

Re: vmalloc with GFP_NOFS

2018-04-25 Thread Mikulas Patocka
On Wed, 25 Apr 2018, Michal Hocko wrote: > On Wed 25-04-18 08:43:32, Mikulas Patocka wrote: > > > > > > On Tue, 24 Apr 2018, Michal Hocko wrote: > > > > > On Tue 24-04-18 19:17:12, Mikulas Patocka wrote: > > > > > > > > > > > > On Tue, 24 Apr 2018, Michal Hocko wrote: > > > > > > > > > > S

Re: vmalloc with GFP_NOFS

2018-04-25 Thread Michal Hocko
; On Wed 25-04-18 00:18:40, Richard Weinberger wrote: > > > > > Am Dienstag, 24. April 2018, 21:28:03 CEST schrieb Michal Hocko: > > > > > > > Also only for debugging. > > > > > > > Getting rid of vmalloc with GFP_NOFS in UBIFS is no big prob

Re: vmalloc with GFP_NOFS

2018-04-25 Thread Mikulas Patocka
. April 2018, 21:28:03 CEST schrieb Michal Hocko: > > > > > > Also only for debugging. > > > > > > Getting rid of vmalloc with GFP_NOFS in UBIFS is no big problem. > > > > > > I can prepare a patch. > > > > > > > > > > Cool! &

Re: vmalloc with GFP_NOFS

2018-04-24 Thread Michal Hocko
ebugging. > > > > > Getting rid of vmalloc with GFP_NOFS in UBIFS is no big problem. > > > > > I can prepare a patch. > > > > > > > > Cool! > > > > > > > > Anyway, if UBIFS has some reclaim recursion critical sections in

Re: vmalloc with GFP_NOFS

2018-04-24 Thread Mikulas Patocka
On Tue, 24 Apr 2018, Michal Hocko wrote: > On Wed 25-04-18 00:18:40, Richard Weinberger wrote: > > Am Dienstag, 24. April 2018, 21:28:03 CEST schrieb Michal Hocko: > > > > Also only for debugging. > > > > Getting rid of vmalloc with GFP_NOFS in UBIFS is no big

Re: vmalloc with GFP_NOFS

2018-04-24 Thread Michal Hocko
On Wed 25-04-18 00:18:40, Richard Weinberger wrote: > Am Dienstag, 24. April 2018, 21:28:03 CEST schrieb Michal Hocko: > > > Also only for debugging. > > > Getting rid of vmalloc with GFP_NOFS in UBIFS is no big problem. > > > I can prepare a patch. > > >

Re: vmalloc with GFP_NOFS

2018-04-24 Thread Richard Weinberger
Am Dienstag, 24. April 2018, 21:28:03 CEST schrieb Michal Hocko: > > Also only for debugging. > > Getting rid of vmalloc with GFP_NOFS in UBIFS is no big problem. > > I can prepare a patch. > > Cool! > > Anyway, if UBIFS has some reclaim recursion critical sec

Re: vmalloc with GFP_NOFS

2018-04-24 Thread Michal Hocko
On Tue 24-04-18 20:26:23, Steven Whitehouse wrote: [...] > It would be good to fix this, and it has been known as an issue for a long > time. We might well be able to make use of the new API though. It might be > as simple as adding the calls when we get & release glocks, but I'd have to > check th

Re: vmalloc with GFP_NOFS

2018-04-24 Thread Michal Hocko
tto. > > > fs/ubifs/lpt_commit.c > > Here we use it also only in debugging mode and in one case for > fatal error reporting. > No hot paths. > > > fs/ubifs/orphan.c > > Also only for debugging. > Getting rid of vmalloc with GFP_NOFS in UBIFS is no big pro

Re: vmalloc with GFP_NOFS

2018-04-24 Thread Steven Whitehouse
Hi, On 24/04/18 17:27, Michal Hocko wrote: Hi, it seems that we still have few vmalloc users who perform GFP_NOFS allocation: drivers/mtd/ubi/io.c fs/ext4/xattr.c fs/gfs2/dir.c fs/gfs2/quota.c fs/nfs/blocklayout/extent_tree.c fs/ubifs/debug.c fs/ubifs/lprops.c fs/ubifs/lpt_commit.c fs/ubifs/orp

Re: vmalloc with GFP_NOFS

2018-04-24 Thread Michal Hocko
On Tue 24-04-18 14:35:36, Theodore Ts'o wrote: > On Tue, Apr 24, 2018 at 10:27:12AM -0600, Michal Hocko wrote: > > fs/ext4/xattr.c > > > > What to do about this? Well, there are two things. Firstly, it would be > > really great to double check whether the GFP_NOFS is really needed. I > > cannot ju

Re: vmalloc with GFP_NOFS

2018-04-24 Thread Richard Weinberger
[resending without html ...] Am Dienstag, 24. April 2018, 18:27:12 CEST schrieb Michal Hocko: > Hi, > it seems that we still have few vmalloc users who perform GFP_NOFS > allocation: > drivers/mtd/ubi/io.c UBI is not a big deal. We use it here like in UBIFS for debugging when self-checks are enab

Re: vmalloc with GFP_NOFS

2018-04-24 Thread Theodore Y. Ts'o
On Tue, Apr 24, 2018 at 10:27:12AM -0600, Michal Hocko wrote: > fs/ext4/xattr.c > > What to do about this? Well, there are two things. Firstly, it would be > really great to double check whether the GFP_NOFS is really needed. I > cannot judge that because I am not familiar with the code. *Most* o

Re: vmalloc with GFP_NOFS

2018-04-24 Thread Mikulas Patocka
On Tue, 24 Apr 2018, Michal Hocko wrote: > On Tue 24-04-18 12:46:55, Mikulas Patocka wrote: > > > > > > On Tue, 24 Apr 2018, Michal Hocko wrote: > > > > > Hi, > > > it seems that we still have few vmalloc users who perform GFP_NOFS > > > allocation: > > > drivers/mtd/ubi/io.c > > > fs/ext4/xa

Re: vmalloc with GFP_NOFS

2018-04-24 Thread Michal Hocko
On Tue 24-04-18 12:46:55, Mikulas Patocka wrote: > > > On Tue, 24 Apr 2018, Michal Hocko wrote: > > > Hi, > > it seems that we still have few vmalloc users who perform GFP_NOFS > > allocation: > > drivers/mtd/ubi/io.c > > fs/ext4/xattr.c > > fs/gfs2/dir.c > > fs/gfs2/quota.c > > fs/nfs/blocklayo

Re: vmalloc with GFP_NOFS

2018-04-24 Thread Mikulas Patocka
On Tue, 24 Apr 2018, Michal Hocko wrote: > Hi, > it seems that we still have few vmalloc users who perform GFP_NOFS > allocation: > drivers/mtd/ubi/io.c > fs/ext4/xattr.c > fs/gfs2/dir.c > fs/gfs2/quota.c > fs/nfs/blocklayout/extent_tree.c > fs/ubifs/debug.c > fs/ubifs/lprops.c > fs/ubifs/lpt_co

vmalloc with GFP_NOFS

2018-04-24 Thread Michal Hocko
Hi, it seems that we still have few vmalloc users who perform GFP_NOFS allocation: drivers/mtd/ubi/io.c fs/ext4/xattr.c fs/gfs2/dir.c fs/gfs2/quota.c fs/nfs/blocklayout/extent_tree.c fs/ubifs/debug.c fs/ubifs/lprops.c fs/ubifs/lpt_commit.c fs/ubifs/orphan.c Unfortunatelly vmalloc doesn't suppoer G