Received: by 2002:a25:31c3:0:0:0:0:0 with SMTP id x186csp1034263ybx; Wed, 30 Oct 2019 08:52:22 -0700 (PDT) X-Google-Smtp-Source: APXvYqwI78EOyu62AV6CqlIcjlesT1Id7pO+GmWSNxTwN0rN87sQljcZeYHwv29qV6eIUxXKISHe X-Received: by 2002:aa7:c515:: with SMTP id o21mr388923edq.184.1572450742533; Wed, 30 Oct 2019 08:52:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1572450742; cv=none; d=google.com; s=arc-20160816; b=LDSxE74z1d4uOHXB2/jaIkh2xrxZJDMRMGEsLcp3jn12wCX7d7PB2E2/s8lsmkDCv0 IGW5bNWEcl4YLO/dLkGl+bpauk2KZa58tc6sqykk5UZ0kqcE7Ew7bnCzQVL0juOccccx sSZoKax+KGzU+PQMowzdYVnTO8JzPqZH+2tst42cltWQI9xUdBhbtsoCWF1ZFTK5qGXw jHRG8K9mH4GRboG4nCqZmlwHxXVJ1GV79hmIliraij9ZDKhjjMoLMsDuZ8sFXXI7N3S/ szKgsJZEJsELF3xSY1dNFRQDDhPTYWAiZyDpMA3brrq4ejLTnCr4MXOnBQC6YqmW5wjH LLhw== 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:dkim-signature; bh=tlzW+EHXjriGMcNx2q7rBODiO5QJOtbDYR9mIItAx7c=; b=pq6qndXtPpGkFUyjNkNQ0Ft7pUb6xbMxRIW2i/ONtgBvC7okwEjmXsM3oHdS2VLDv9 Bhj/HOAV/AouUwLZhfCD2kF7Rpf43Y1MhAWNB/9MXNXwM8JwXZYVWSlinTwIvn6FuLqH 1Cg5o7Ey0WzNxahS8FM/eDHTv22MiN/+QXmctspP+YAhGuPdzWH5jsctNf3Q0JoEKznQ yyY+qUNa4j4i9LuMjYQxHh/5Cytb/SEeyU/hXUQG74hkIuDUjOz7PbGn6XjHKn/OWq+e ZUofLgk6okBmjZytvmDxfKYbzMcFzd1ptQFcfIkWUvjfz2NIdsK+kBNVfbjgO9eF+cP5 oLSA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@aol.com header.s=a2048 header.b=PxRXFHyq; 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; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=aol.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id m3si2041399edb.250.2019.10.30.08.51.59; Wed, 30 Oct 2019 08:52:22 -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; dkim=pass header.i=@aol.com header.s=a2048 header.b=PxRXFHyq; 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; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=aol.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727652AbfJ3Puw (ORCPT + 99 others); Wed, 30 Oct 2019 11:50:52 -0400 Received: from sonic308-55.consmr.mail.gq1.yahoo.com ([98.137.68.31]:34057 "EHLO sonic308-55.consmr.mail.gq1.yahoo.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727629AbfJ3Puv (ORCPT ); Wed, 30 Oct 2019 11:50:51 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aol.com; s=a2048; t=1572450650; bh=tlzW+EHXjriGMcNx2q7rBODiO5QJOtbDYR9mIItAx7c=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From:Subject; b=PxRXFHyq1BwiPdfBCGkKlBIYlzsV/0JFMaOvTMvltrSJynguwBjBs7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BLrYct2lqEIBpIhl9puQ0Oksx9F5RiQ1y_xRgd_SqGlj6b4vcECOrZ4my1r v9.ca5Br_axLga54rozxFcp7fIXqo5gIwFK_ek2fLTnvWGWV.EWcG.ggyshNL9b6LM_fXHbZdMjT S_A0qQV2QvWBnY8GAjatPCNxgae4Hd8Iauw8Xqia7qfoZIf2J_dhqazdSyeHSGRD7fX80x7lp7O1 D7EO33CSUhEllw7EUu8Zi9a6rTDLbrLaAGFdwaedVb_7J_5K.9jyFKt7vARtP4ybn7U2Qn_wr.zv 8hHxG69aQSusZpFtKIDCoICNsPZKbbw_RPI32wmSvnGBFBH0fsGNANC9bAobaM623daFV1GOCamV f8XfQ21vn1mkUsR6RCVNwMuHxlSSB44jYQsnwhtc33zSX29N9wlpo54zbXoj.aELxlrPC7YhaJu1 YlLlVO6DgLja30t54lFBbj6V1j5k6EcBDQ1XLqC0aNoI0rXtZQRYBPL4kNdW2R5E5rRrr8nIUrdV .akd01OnBIOijzH9Hy_GSuDLg6i0scWI7MokVOSHS5Ll_fdrx2xQz.rFA9fGeWaAkMgxDSs8wHWr R8LZxzmW34m0mgMDRWVEFwpgh55_JjkHl2ONqcZMpN7WEOMGgOgiHJ2qQcsZzrwiO.80SS0zYA6E - Received: from sonic.gate.mail.ne1.yahoo.com by sonic308.consmr.mail.gq1.yahoo.com with HTTP; Wed, 30 Oct 2019 15:50:50 +0000 Received: by smtp419.mail.gq1.yahoo.com (Oath Hermes SMTP Server) with ESMTPA ID ecf34bf87d460b3002b31f8cc4759825; Wed, 30 Oct 2019 15:50:47 +0000 (UTC) Date: Wed, 30 Oct 2019 23:50:37 +0800 From: Gao Xiang To: "Theodore Y. Ts'o" Cc: Gao Xiang , Jonathan Corbet , linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-f2fs-devel@lists.sourceforge.net, Jaegeuk Kim Subject: Re: [f2fs-dev] [PATCH] f2fs: bio_alloc should never fail Message-ID: <20191030155020.GA3953@hsiangkao-HP-ZHAN-66-Pro-G1> 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> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20191030151444.GC16197@mit.edu> User-Agent: Mutt/1.9.4 (2018-02-28) X-Mailer: WebService/1.1.14593 hermes Apache-HttpAsyncClient/4.1.4 (Java/1.8.0_181) Content-Length: 1826 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Ted, On Wed, Oct 30, 2019 at 11:14:45AM -0400, 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. Thanks for your reply. I agree with your idea. Actually I think after this version patch is applied, all are the same as the previous status (whether some deadlock or not). So I'm curious about the original issue in commit 740432f83560 ("f2fs: handle failed bio allocation"). Since f2fs manages multiple write bios with its internal fio but it seems the commit is not helpful to resolve potential mempool deadlock (I'm confused since no calltrace, maybe I'm wrong)... I think it should be gotten clear first and think how to do next.. (I tend not to add another private bioset since it's unshareable as you said as well...) Thanks, Gao Xiang > > Regards, > > - Ted > >