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


Groups > linux.kernel > #1409092

Re: [PATCH 17/17] jbd2: get rid of superfluous __GFP_REPEAT

From Jan Kara <jack@suse.cz>
Newsgroups linux.kernel
Subject Re: [PATCH 17/17] jbd2: get rid of superfluous __GFP_REPEAT
Date 2016-05-30 15:10 +0200
Message-ID <rEv7b-4Dp-21@gated-at.bofh.it> (permalink)
References <rErwC-2fk-9@gated-at.bofh.it> <rErwD-2fk-51@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Mon 30-05-16 11:14:59, Michal Hocko wrote:
> From: Michal Hocko <mhocko@suse.com>
> 
> jbd2_alloc is explicit about its allocation preferences wrt. the
> allocation size. Sub page allocations go to the slab allocator
> and larger are using either the page allocator or vmalloc. This
> is all good but the logic is unnecessarily complex.
> 1) as per Ted, the vmalloc fallback is a left-over:
> : jbd2_alloc is only passed in the bh->b_size, which can't be >
> : PAGE_SIZE, so the code path that calls vmalloc() should never get
> : called.  When we conveted jbd2_alloc() to suppor sub-page size
> : allocations in commit d2eecb039368, there was an assumption that it
> : could be called with a size greater than PAGE_SIZE, but that's
> : certaily not true today.
> Moreover vmalloc allocation might even lead to a deadlock because
> the callers expect GFP_NOFS context while vmalloc is GFP_KERNEL.
> 
> 2) __GFP_REPEAT for requests <= PAGE_ALLOC_COSTLY_ORDER is ignored
> since the flag was introduced.
> 
> Let's simplify the code flow and use the slab allocator for sub-page
> requests and the page allocator for others. Even though order > 0 is
> not currently used as per above leave that option open.
> 
> Cc: "Theodore Ts'o" <tytso@mit.edu>
> Cc: Jan Kara <jack@suse.cz>
> Signed-off-by: Michal Hocko <mhocko@suse.com>

The patch looks good. You can add:

Reviewed-by: Jan Kara <jack@suse.cz>

Since the patch is in pretty stable parts of JBD2 I think it is fine to
merge it through Andrew's tree with the rest of the series.

								Honza
-- 
Jan Kara <jack@suse.com>
SUSE Labs, CR

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


Thread

[PATCH 0/19] get rid of superfluous __GFP_REPEAT Michal Hocko <mhocko@kernel.org> - 2016-05-30 11:20 +0200
  [PATCH 12/17] sparc: get rid of superfluous __GFP_REPEAT Michal Hocko <mhocko@kernel.org> - 2016-05-30 11:20 +0200
    Re: [PATCH 12/17] sparc: get rid of superfluous __GFP_REPEAT David Miller <davem@davemloft.net> - 2016-05-30 20:30 +0200
  [PATCH 14/17] sh: get rid of superfluous __GFP_REPEAT Michal Hocko <mhocko@kernel.org> - 2016-05-30 11:20 +0200
  [PATCH 17/17] jbd2: get rid of superfluous __GFP_REPEAT Michal Hocko <mhocko@kernel.org> - 2016-05-30 11:20 +0200
    Re: [PATCH 17/17] jbd2: get rid of superfluous __GFP_REPEAT Jan Kara <jack@suse.cz> - 2016-05-30 15:10 +0200
  [PATCH 07/17] mips: get rid of superfluous __GFP_REPEAT Michal Hocko <mhocko@kernel.org> - 2016-05-30 11:20 +0200
  [PATCH 10/17] score: get rid of superfluous __GFP_REPEAT Michal Hocko <mhocko@kernel.org> - 2016-05-30 11:20 +0200
  [PATCH 01/17] tree wide: get rid of __GFP_REPEAT for order-0 allocations part I Michal Hocko <mhocko@kernel.org> - 2016-05-30 11:20 +0200
  [PATCH 06/17] arc: get rid of superfluous __GFP_REPEAT Michal Hocko <mhocko@kernel.org> - 2016-05-30 11:20 +0200

csiph-web