Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1495591
| From | Dave Chinner <david@fromorbit.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [RFC PATCH] mm, compaction: allow compaction for GFP_NOFS requests |
| Date | 2016-10-04 22:40 +0200 |
| Message-ID | <soEFj-7BW-17@gated-at.bofh.it> (permalink) |
| References | <sot7d-4Y-45@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On Tue, Oct 04, 2016 at 10:12:15AM +0200, Michal Hocko wrote:
> From: Michal Hocko <mhocko@suse.com>
>
> compaction has been disabled for GFP_NOFS and GFP_NOIO requests since
> the direct compaction was introduced by 56de7263fcf3 ("mm: compaction:
> direct compact when a high-order allocation fails"). The main reason
> is that the migration of page cache pages might recurse back to fs/io
> layer and we could potentially deadlock. This is overly conservative
> because all the anonymous memory is migrateable in the GFP_NOFS context
> just fine. This might be a large portion of the memory in many/most
> workkloads.
>
> Remove the GFP_NOFS restriction and make sure that we skip all fs pages
> (those with a mapping) while isolating pages to be migrated. We cannot
> consider clean fs pages because they might need a metadata update so
> only isolate pages without any mapping for nofs requests.
>
> The effect of this patch will be probably very limited in many/most
> workloads because higher order GFP_NOFS requests are quite rare,
You say they are rare only because you don't know how to trigger
them easily. :/
Try this:
# mkfs.xfs -f -n size=64k <dev>
# mount <dev> /mnt/scratch
# time ./fs_mark -D 10000 -S0 -n 100000 -s 0 -L 32 \
-d /mnt/scratch/0 -d /mnt/scratch/1 \
-d /mnt/scratch/2 -d /mnt/scratch/3 \
-d /mnt/scratch/4 -d /mnt/scratch/5 \
-d /mnt/scratch/6 -d /mnt/scratch/7 \
-d /mnt/scratch/8 -d /mnt/scratch/9 \
-d /mnt/scratch/10 -d /mnt/scratch/11 \
-d /mnt/scratch/12 -d /mnt/scratch/13 \
-d /mnt/scratch/14 -d /mnt/scratch/15
As soon as tail pushing on the journal starts (a few seconds in,
most likely), you'll start to see lots of 65kB allocations being
requested in GFP_NOFS context by the xfs-cil-worker context doing
journal checkpoint formatting....
Cheers,
Dave.
--
Dave Chinner
david@fromorbit.com
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[RFC PATCH] mm, compaction: allow compaction for GFP_NOFS requests Michal Hocko <mhocko@kernel.org> - 2016-10-04 10:20 +0200
Re: [RFC PATCH] mm, compaction: allow compaction for GFP_NOFS requests Dave Chinner <david@fromorbit.com> - 2016-10-04 22:40 +0200
Re: [RFC PATCH] mm, compaction: allow compaction for GFP_NOFS requests Michal Hocko <mhocko@kernel.org> - 2016-10-05 13:40 +0200
Re: [RFC PATCH] mm, compaction: allow compaction for GFP_NOFS requests Dave Chinner <david@fromorbit.com> - 2016-10-06 04:20 +0200
Re: [RFC PATCH] mm, compaction: allow compaction for GFP_NOFS requests Michal Hocko <mhocko@kernel.org> - 2016-10-07 15:20 +0200
Re: [RFC PATCH] mm, compaction: allow compaction for GFP_NOFS requests Dave Chinner <david@fromorbit.com> - 2016-10-13 02:30 +0200
Re: [RFC PATCH] mm, compaction: allow compaction for GFP_NOFS requests Vlastimil Babka <vbabka@suse.cz> - 2016-10-07 07:30 +0200
Re: [RFC PATCH] mm, compaction: allow compaction for GFP_NOFS requests Michal Hocko <mhocko@kernel.org> - 2016-10-07 09:00 +0200
Re: [RFC PATCH] mm, compaction: allow compaction for GFP_NOFS requests Vlastimil Babka <vbabka@suse.cz> - 2016-10-07 10:20 +0200
Re: [RFC PATCH] mm, compaction: allow compaction for GFP_NOFS requests Michal Hocko <mhocko@kernel.org> - 2016-10-07 11:30 +0200
Re: [RFC PATCH] mm, compaction: allow compaction for GFP_NOFS requests Vlastimil Babka <vbabka@suse.cz> - 2016-10-10 08:50 +0200
csiph-web