Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp2475456ybl; Mon, 20 Jan 2020 03:43:15 -0800 (PST) X-Google-Smtp-Source: APXvYqw0z1nUnbg4gzqat1J+/O+w1tem547yQ1nTA9LOBz2CyTBR/NbBocRJdIQybMnlQjd0lCOP X-Received: by 2002:a05:6830:44e:: with SMTP id d14mr14824580otc.228.1579520595296; Mon, 20 Jan 2020 03:43:15 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1579520595; cv=none; d=google.com; s=arc-20160816; b=BaQw2cgxLrROPF98voj+OCuXVyshmjMVduYdYF/2CSYf03hWaY30e1JKxSVzYq7bei fpWRJXoL1HDGUNouUO1hnbU435eLRwWqDWQlyFLxlIfolM9xppI6U+/s+svYleWgxx56 MwuPuXf4vpERLCGIK6/h/+NMMOPG4RaDsPxYJqowVuSu8EmXGmzYDQl9RTktYaduwUnY E1QQl+gtzuSeNeFAE/IkqrZQMih5xp3BJuSN8qyZEbug+vo42yWBQxZ9ZsV1OHzt4WRS 6oz3UZ0IZoNfZdxHhBEoxMzlMpMACI2mJs8bdUgIb8bJI0rcYlvdFAzOCCl1p3Q6gC+j wy6g== 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=XBqSyUTySd/AnbKi2ZSJsykVvXI0Vvp+bAVtubZV1y4=; b=WTt5S2xJwMLDl7zUF15nRlsAHAcYSghqpxdavoWlNyJui4Rd0dLbfwPmzEkPJp8jko GQvKUa7thP86tMrdze6RyMtpv2SNvhiVDCQT6Zf6BZlbyCKsBajWeePYMVkHsZYGdeJl KDIzThOSl0qe+KSnrAfgWIte285hGMjsuD9FHqr//5TTejGLaFnOvjfOSmewYa6DuYWt bXVN8RG1kgyY4wm0Raj1bxg9aEB8LsatQWRq6kxbJsTxceF8Mw3dwexINH3lTTSyI9bw UPVVpftPj29rn8tHnXm+6UQOUJtIt0RZXszg+9toNQnMHq6jWEDSEhRrud4WijdRoTzV pvcw== 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 m17si20246996otr.17.2020.01.20.03.43.03; Mon, 20 Jan 2020 03:43:15 -0800 (PST) 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 S1726889AbgATLmP (ORCPT + 99 others); Mon, 20 Jan 2020 06:42:15 -0500 Received: from mx2.suse.de ([195.135.220.15]:56526 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726573AbgATLmP (ORCPT ); Mon, 20 Jan 2020 06:42:15 -0500 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id 372D1AD5C; Mon, 20 Jan 2020 11:42:13 +0000 (UTC) Received: by quack2.suse.cz (Postfix, from userid 1000) id 5CD301E0CF1; Mon, 20 Jan 2020 12:42:07 +0100 (CET) Date: Mon, 20 Jan 2020 12:42:07 +0100 From: Jan Kara To: "yukuai (C)" Cc: Jan Kara , hch@infradead.org, darrick.wong@oracle.com, linux-xfs@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, houtao1@huawei.com, zhengbin13@huawei.com, yi.zhang@huawei.com Subject: Re: [RFC] iomap: fix race between readahead and direct write Message-ID: <20200120114207.GE19861@quack2.suse.cz> References: <20200116063601.39201-1-yukuai3@huawei.com> <20200116153206.GF8446@quack2.suse.cz> <20200117110536.GE17141@quack2.suse.cz> <976d09e1-e3b5-a6a6-d159-9bdac3a7dc84@huawei.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <976d09e1-e3b5-a6a6-d159-9bdac3a7dc84@huawei.com> 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 Sun 19-01-20 09:17:00, yukuai (C) wrote: > > > On 2020/1/17 19:05, Jan Kara wrote: > > provide > > allocation for each page separately > > Thank you for your response! > > I do understand there will be additional CPU overhead. But page is allocated > in __do_page_cache_readahead(), which is called before > iomap_begin(). And I did not change that. Sorry, I didn't express myself clearly. In "...one of the big points of iomap infrastructure is that you call filesystem once to give you large extent instead of calling it to provide allocation for each page separately." I meant that with your patch, you call into filesystem to provide "block allocation information" for each page separately. And it seems we both agree this is going to cause additional CPU usage in the common case to improve mostly unsupported corner case. Honza -- Jan Kara SUSE Labs, CR