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


Groups > linux.kernel > #1727575

Re: [PATCH 1/6] lightnvm: pblk: check for failed mempool alloc.

From Jens Axboe <axboe@kernel.dk>
Newsgroups linux.kernel
Subject Re: [PATCH 1/6] lightnvm: pblk: check for failed mempool alloc.
Date 2017-09-06 17:10 +0200
Message-ID <umK7L-3vz-15@gated-at.bofh.it> (permalink)
References <umK7L-3vz-5@gated-at.bofh.it> <umK7L-3vz-17@gated-at.bofh.it> <umK7L-3vz-19@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On 09/06/2017 09:08 AM, Johannes Thumshirn wrote:
> On Wed, Sep 06, 2017 at 05:01:01PM +0200, Javier González wrote:
>> Check for failed mempool allocations and act accordingly.
> 
> Are you sure it is needed? Quoting from mempool_alloc()s Documentation:
> "[...] Note that due to preallocation, this function *never* fails when called
> from process contexts. (it might fail if called from an IRQ context.) [...]"

It's not needed, mempool() will never fail if __GFP_WAIT is set in the
mask. The use case here is GFP_KERNEL, which does include __GFP_WAIT.

-- 
Jens Axboe

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


Thread

Re: [PATCH 1/6] lightnvm: pblk: check for failed mempool alloc. Jens Axboe <axboe@kernel.dk> - 2017-09-06 17:10 +0200
  Re: [PATCH 1/6] lightnvm: pblk: check for failed mempool alloc. Javier González <jg@lightnvm.io> - 2017-09-06 17:20 +0200
  Re: [PATCH 1/6] lightnvm: pblk: check for failed mempool alloc. Javier González <jg@lightnvm.io> - 2017-09-06 17:20 +0200
    Re: [PATCH 1/6] lightnvm: pblk: check for failed mempool alloc. Jens Axboe <axboe@kernel.dk> - 2017-09-06 17:20 +0200
      Re: [PATCH 1/6] lightnvm: pblk: check for failed mempool alloc. Jens Axboe <axboe@kernel.dk> - 2017-09-06 17:30 +0200
        Re: [PATCH 1/6] lightnvm: pblk: check for failed mempool alloc. Javier González <jg@lightnvm.io> - 2017-09-06 20:30 +0200
  Re: [PATCH 1/6] lightnvm: pblk: check for failed mempool alloc. Johannes Thumshirn <jthumshirn@suse.de> - 2017-09-06 17:20 +0200

csiph-web