Received: by 2002:a25:31c3:0:0:0:0:0 with SMTP id x186csp991528ybx; Wed, 30 Oct 2019 08:17:28 -0700 (PDT) X-Google-Smtp-Source: APXvYqwNkwFq5m6KlqLTtT4KWI9I4iEcbjCNeIXLJwmDLaAck1zYk6BM+jJDhj/FZpw1AcNiyyI4 X-Received: by 2002:aa7:dc44:: with SMTP id g4mr173208edu.266.1572448648591; Wed, 30 Oct 2019 08:17:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1572448648; cv=none; d=google.com; s=arc-20160816; b=maVH7GiKKFYKfjTRe/wzPS2lywt91hJHhaG63r34yEYXpZA4qwaNEPvqRdP+6kXYU7 mstAsOGy9IbLMTrF/IFLuTg2wNXDMWudlnGcBB0NgETWW7XpRLhotQ+u5KbBqylO/Ry6 1RtldUrjKSuSKtfdAdnNAB+qwYGM1Jwi/BDQpTKmMkbhr+dR4SSJ0a7Zv1yD8hVjGoZd gA9+K/IaMso/4okjCz4Fm58WVTqSRQ5vopSh00DMUCvBn51+8sdM44EE+7vjZdLphArB bEsaZYLEkszWRqF8vTYrVEhr/g5+lCHdC32Wego7z/fVy2nHTF3iYmGUxCe0YmR8X3p+ MbAw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=aguS72LZou1XoIz14PFGtqUpbHgxgvkO0/qCIwRIgQs=; b=07ODebZ6I+X7fddUGVikLiNTvNQBXJ/NW8/jEFjrcJjdyV9zWPEW+rY/MB9uzm3mQS 7sXAbm5oOcVat+LGQv1cZL0GDcAKdtteFxhZEbrVbTsIC7yxQNW2Fpe6+IetmJNvHem/ O0aN1ie7X0tlW/lW5vvdUPbVeXDhEFvNKgedEnkK9dtIkxtSEymt9mXKy/r7HWk5QfIy NKD7H/b9giMrESnggynzMAsmwPMgBQw2Go+f8/N9ncJE8ElpKKSC9dY313f4Lr2z8gCC Xt1kXAkbfl7o9qcQNNjPOLFuE7OHinuwriloDvzZWxWKoX7JTkH7IYtIpIfrspMqlp0T Piyw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id m7si1996854eda.192.2019.10.30.08.16.56; Wed, 30 Oct 2019 08:17:28 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727205AbfJ3PPP (ORCPT + 99 others); Wed, 30 Oct 2019 11:15:15 -0400 Received: from outgoing-auth-1.mit.edu ([18.9.28.11]:52948 "EHLO outgoing.mit.edu" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727169AbfJ3PPO (ORCPT ); Wed, 30 Oct 2019 11:15:14 -0400 Received: from callcc.thunk.org (guestnat-104-133-0-98.corp.google.com [104.133.0.98] (may be forged)) (authenticated bits=0) (User authenticated as tytso@ATHENA.MIT.EDU) by outgoing.mit.edu (8.14.7/8.12.4) with ESMTP id x9UFEjKE010180 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 30 Oct 2019 11:14:46 -0400 Received: by callcc.thunk.org (Postfix, from userid 15806) id 16ABD420456; Wed, 30 Oct 2019 11:14:45 -0400 (EDT) Date: Wed, 30 Oct 2019 11:14:45 -0400 From: "Theodore Y. Ts'o" To: Gao Xiang Cc: Chao Yu , Jaegeuk Kim , Chao Yu , linux-f2fs-devel@lists.sourceforge.net, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, Jonathan Corbet Subject: Re: [f2fs-dev] [PATCH] f2fs: bio_alloc should never fail Message-ID: <20191030151444.GC16197@mit.edu> References: <20191030035518.65477-1-gaoxiang25@huawei.com> <20aa40bd-280d-d223-9f73-d9ed7dbe4f29@huawei.com> <20191030091542.GA24976@architecture4> <19a417e6-8f0e-564e-bc36-59bfc883ec16@huawei.com> <20191030104345.GB170703@architecture4> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20191030104345.GB170703@architecture4> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Oct 30, 2019 at 06:43:45PM +0800, Gao Xiang wrote: > > You're right, in low memory scenario, allocation with bioset will be faster, as > > you mentioned offline, maybe we can add/use a priviate bioset like btrfs did > > rather than using global one, however, we'd better check how deadlock happen > > with a bioset mempool first ... > > Okay, hope to get hints from Jaegeuk and redo this patch then... It's not at all clear to me that using a private bioset is a good idea for f2fs. That just means you're allocating a separate chunk of memory just for f2fs, as opposed to using the global pool. That's an additional chunk of non-swapable kernel memory that's not going to be available, in *addition* to the global mempool. Also, who else would you be contending for space with the global mempool? It's not like an mobile handset is going to have other users of the global bio mempool. On a low-end mobile handset, memory is at a premium, so wasting memory to no good effect isn't going to be a great idea. Regards, - Ted