All of lore.kernel.org
 help / color / mirror / Atom feed
From: Theodore Ts'o <tytso@mit.edu>
To: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
Cc: mhocko@kernel.org, linux-mm@kvack.org,
	Andrew Morton <akpm@linux-foundation.org>,
	LKML <linux-kernel@vger.kernel.org>,
	Michal Hocko <mhocko@suse.com>,
	john.johansen@canonical.com
Subject: Re: [PATCH] jbd2: get rid of superfluous __GFP_REPEAT
Date: Sun, 8 Nov 2015 00:08:02 -0500	[thread overview]
Message-ID: <20151108050802.GB3880@thunk.org> (raw)
In-Reply-To: <563D526F.6030504@I-love.SAKURA.ne.jp>

On Sat, Nov 07, 2015 at 10:22:55AM +0900, Tetsuo Handa wrote:
> All jbd2_alloc() callers seem to pass GFP_NOFS. Therefore, use of
> vmalloc() which implicitly passes GFP_KERNEL | __GFP_HIGHMEM can cause
> deadlock, can't it? This vmalloc(size) call needs to be replaced with
> __vmalloc(size, flags).

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.

					- Ted

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

WARNING: multiple messages have this Message-ID (diff)
From: "Theodore Ts'o" <tytso@mit.edu>
To: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
Cc: mhocko@kernel.org, linux-mm@kvack.org,
	Andrew Morton <akpm@linux-foundation.org>,
	LKML <linux-kernel@vger.kernel.org>,
	Michal Hocko <mhocko@suse.com>,
	john.johansen@canonical.com
Subject: Re: [PATCH] jbd2: get rid of superfluous __GFP_REPEAT
Date: Sun, 8 Nov 2015 00:08:02 -0500	[thread overview]
Message-ID: <20151108050802.GB3880@thunk.org> (raw)
In-Reply-To: <563D526F.6030504@I-love.SAKURA.ne.jp>

On Sat, Nov 07, 2015 at 10:22:55AM +0900, Tetsuo Handa wrote:
> All jbd2_alloc() callers seem to pass GFP_NOFS. Therefore, use of
> vmalloc() which implicitly passes GFP_KERNEL | __GFP_HIGHMEM can cause
> deadlock, can't it? This vmalloc(size) call needs to be replaced with
> __vmalloc(size, flags).

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.

					- Ted

  reply	other threads:[~2015-11-08  5:08 UTC|newest]

Thread overview: 39+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-11-05 16:15 [PATCH 0/3] __GFP_REPEAT cleanup mhocko
2015-11-05 16:15 ` mhocko
2015-11-05 16:15 ` [PATCH 1/3] tree wide: get rid of __GFP_REPEAT for order-0 allocations part I mhocko
2015-11-05 16:15   ` mhocko
2015-11-09 22:04   ` Vlastimil Babka
2015-11-09 22:04     ` Vlastimil Babka
2015-11-10 12:51     ` Michal Hocko
2015-11-10 12:51       ` Michal Hocko
2015-11-18 14:15       ` Vlastimil Babka
2015-11-18 14:15         ` Vlastimil Babka
2015-11-27  9:38         ` Michal Hocko
2015-11-27  9:38           ` Michal Hocko
2015-11-28 10:08           ` Michal Hocko
2015-11-28 10:08             ` Michal Hocko
2015-11-30 17:02           ` Vlastimil Babka
2015-11-30 17:02             ` Vlastimil Babka
2015-12-01 16:27             ` Michal Hocko
2015-12-01 16:27               ` Michal Hocko
2015-12-21 12:18               ` Vlastimil Babka
2015-12-21 12:18                 ` Vlastimil Babka
2015-11-05 16:15 ` [PATCH 2/3] tree wide: get rid of __GFP_REPEAT for small order requests mhocko
2015-11-05 16:15   ` mhocko
2015-11-05 16:15   ` mhocko
2015-11-05 16:16 ` [PATCH 3/3] jbd2: get rid of superfluous __GFP_REPEAT mhocko
2015-11-05 16:16   ` mhocko
2015-11-06 16:17   ` [PATCH] " mhocko
2015-11-06 16:17     ` mhocko
2015-11-07  1:22     ` Tetsuo Handa
2015-11-07  1:22       ` Tetsuo Handa
2015-11-08  5:08       ` Theodore Ts'o [this message]
2015-11-08  5:08         ` Theodore Ts'o
2015-11-09  8:16         ` Michal Hocko
2015-11-09  8:16           ` Michal Hocko
2015-11-26 15:10           ` Michal Hocko
2015-11-26 15:10             ` Michal Hocko
2015-11-26 20:18             ` Theodore Ts'o
2015-11-26 20:18               ` Theodore Ts'o
2015-11-27  7:56               ` Michal Hocko
2015-11-27  7:56                 ` Michal Hocko

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20151108050802.GB3880@thunk.org \
    --to=tytso@mit.edu \
    --cc=akpm@linux-foundation.org \
    --cc=john.johansen@canonical.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=mhocko@kernel.org \
    --cc=mhocko@suse.com \
    --cc=penguin-kernel@I-love.SAKURA.ne.jp \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.