Received: by 2002:a25:31c3:0:0:0:0:0 with SMTP id x186csp500921ybx; Wed, 30 Oct 2019 19:05:37 -0700 (PDT) X-Google-Smtp-Source: APXvYqzkQvj4eA4inbjF2zufKTckG4+izX1IbCrOgVJizK/vQV5cgmp9tLo4yAbm2kJ07qrA8DY9 X-Received: by 2002:a17:906:cc94:: with SMTP id oq20mr1356142ejb.263.1572487537770; Wed, 30 Oct 2019 19:05:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1572487537; cv=none; d=google.com; s=arc-20160816; b=uazoG0am3+Sc3odS4GXj6TkR1mwpCn4fSHCg5VcoaK4o2GztXfOOLvjfS4OZXPfnVL Ja+fuOzn9LnGQh90dzY6kewotcq7zkOAj6g9JkPjoE46XvIdiokf2nU5sqe4iSRktlCq 8Wz7d/wHcH+a+vKDgBvwolsWAtWstEvxVduOb9RY/gEWKOGc53Znq/SGeVXZJBWoOdpS LIZtn2ReMVphc5s4HVZ68MJoTUzYzmRWpZcgaWUtW0lrQ0kxCDHpolfLun7uwxo5pTzO Bpr2USss9I7s975C6L73G6xOsRdEC48S+WZS+10mWicWG+ki5sx2YnCctCKMfbqcXaNN Zs0Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject; bh=0anzFgkj3RFTdaj4qaHbkTCuoUxzauKwFvbdiuz4ASo=; b=H0aTLcmdUN1IlsxPPXFpHFQVHow4tjzN0DzzQf3ZPvP4t0sMpZ1w65s2NPNJHJpqiL XCVr/tdBAnmWrgYbuHCaxAch0leLWDRuQ0NDhOfo3ukgKxFNOKx6nLX0QWUTNFa/ZMCv 0XjeV2eFgCzS5k6E2UJxd4uIEWGHbXa4D+aw4S0Zmu/mnFe784R+iV3lLnpVK76VcpGp wW3dcuqk5b57Ordj2k6oEyiqr7aYEIrXtwl2J7uoNeRUPWKbWmS8k5gub8yu/Dd63ttv K20/YIfZ0VrRjqOn4RML+v23uMXbJQUfoPIgE/CzzDNj9l+N9yJ79+jmYf8GTtabfjKI Wd9A== 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 q20si2364120eja.359.2019.10.30.19.05.14; Wed, 30 Oct 2019 19:05:37 -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 S1726524AbfJaCDg (ORCPT + 99 others); Wed, 30 Oct 2019 22:03:36 -0400 Received: from szxga07-in.huawei.com ([45.249.212.35]:38406 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726184AbfJaCDg (ORCPT ); Wed, 30 Oct 2019 22:03:36 -0400 Received: from DGGEMS404-HUB.china.huawei.com (unknown [172.30.72.60]) by Forcepoint Email with ESMTP id 63DA9B70C12BC89C0E01; Thu, 31 Oct 2019 10:03:32 +0800 (CST) Received: from [10.134.22.195] (10.134.22.195) by smtp.huawei.com (10.3.19.204) with Microsoft SMTP Server (TLS) id 14.3.439.0; Thu, 31 Oct 2019 10:03:22 +0800 Subject: Re: [f2fs-dev] [PATCH] f2fs: bio_alloc should never fail To: "Theodore Y. Ts'o" , Gao Xiang CC: Jaegeuk Kim , Chao Yu , , , , Jonathan Corbet 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> <20191030151444.GC16197@mit.edu> From: Chao Yu Message-ID: <61fc6d47-1cb3-4646-d155-444cff0b5b3e@huawei.com> Date: Thu, 31 Oct 2019 10:03:21 +0800 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: <20191030151444.GC16197@mit.edu> Content-Type: text/plain; charset="windows-1252" Content-Language: en-US Content-Transfer-Encoding: 7bit X-Originating-IP: [10.134.22.195] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2019/10/30 23:14, Theodore Y. Ts'o wrote: > 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. You're right, it looks that the purpose that btrfs added private bioset is to avoid abusing bio internal fields (via commit 9be3395bcd4a), f2fs has no such reason to do that now. Thanks, > > Regards, > > - Ted > . >