Received: by 2002:a25:824b:0:0:0:0:0 with SMTP id d11csp842237ybn; Wed, 25 Sep 2019 08:29:33 -0700 (PDT) X-Google-Smtp-Source: APXvYqyK0AwkqqzTUU6eRfvsF2QHAKxlnJkuK/BPbhriNMcTKeeh6Ow2KSlgBHlxugUEY2Fo3dBt X-Received: by 2002:a50:8d5e:: with SMTP id t30mr3642194edt.112.1569425372952; Wed, 25 Sep 2019 08:29:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1569425372; cv=none; d=google.com; s=arc-20160816; b=qJTj1NOWekw82CyCEYtpQ0aYT6SMlNmVBAMRFfmfn4nskq4TCDnyzXY2Zh40Wx0rYJ v3LyPhGm/SJ4vVFF49IiUm70pySt+0TwWNWygBlr3aZDzFTDTAH4vsg/2i+H6Jl0MQiV 9L6OoFKeYOjqRimO6gsAGAYLNy3akHRExawIZ/qYhoF7wK1aBjNjJCODFzqQbcL9arQ7 fvCWamC3hsc+zR4luePVW33wMANpKmpQGLYu5jDFdNLCpeYx6pWKnokN7HqzN0cRLuHU Db+LjnWh/qdVj2PHFeEQKTkXxdc9xH5nE0oTZ+dC1e+n3l//gpbq9jSprXPnlV4C3Wr4 Uz8g== 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:dkim-signature; bh=giOjH0e1+Va7zF2km7iWPR2tjwuOyQDUdxfszpw7LBI=; b=gqNy0n9QqcBUXNAZrGbxTDHdkLTpIZ1R+Mi+xk0ZUkGZpgDLXaN6k61Gq6YghCscWt v/cXs6/MaU3EevF/ag0CHXc3g4RwfGReBEd+PoZ4EynR5aVOM3iejZ+/8tNbX2Ooifug +x+0N+PrtVlZUC3g2GnEGbLHa+s3IJyax6pV3U+wXjLwiNMyKvdJa85+dOmOlW/xSEPX sgilpQAbYBxiMYlUi+lzDw54p+lTrZBOUDolaVVnsQMS9H+20PWXjbUdtKwloD2N9vgf iL2kejKLX1SkaIU7Pubki2zO3lQ20bSObqMOEo1CXyt9hGIoePOLdvDbwb4KFNEbAs9j VAMA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel-dk.20150623.gappssmtp.com header.s=20150623 header.b=W1akfRBT; 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 c9si806226ejn.362.2019.09.25.08.29.08; Wed, 25 Sep 2019 08:29:32 -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=@kernel-dk.20150623.gappssmtp.com header.s=20150623 header.b=W1akfRBT; 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 S1728068AbfIWPgb (ORCPT + 99 others); Mon, 23 Sep 2019 11:36:31 -0400 Received: from mail-io1-f67.google.com ([209.85.166.67]:46450 "EHLO mail-io1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725911AbfIWPgb (ORCPT ); Mon, 23 Sep 2019 11:36:31 -0400 Received: by mail-io1-f67.google.com with SMTP id c6so21310920ioo.13 for ; Mon, 23 Sep 2019 08:36:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel-dk.20150623.gappssmtp.com; s=20150623; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=giOjH0e1+Va7zF2km7iWPR2tjwuOyQDUdxfszpw7LBI=; b=W1akfRBTIQi/Yu602zJ+J+cmVzk+bDRreA4SeyTFjAYb08P+3gBic98jasS/hmmw9p XDGLdYtDJVumghJvStKdUnxMo/zVPf79ptQds8PH8aVOa6/J8yenqKipvssFUBrGT4l6 +57S66axARoIwbAlZAeCNYIOK1q76gf3TyLNRYKFG8DV6SOEETjaJ+VkvS1Co6cxR7d1 TP/B395inKk9JvVShp+3VswuGkcbt2qLHnTL5HxTveEjol1kXXhPq9K9hlbVnV38EeO/ 9CElfQE+CTb4kol1tQOyrgI6kh+hzokHd2P4nwDlyyLhlKGjWXtqawsbj+8xNtwRPYwG 5BoQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=giOjH0e1+Va7zF2km7iWPR2tjwuOyQDUdxfszpw7LBI=; b=kHzznC44bag3BbRHpMKc3U2dJ0Gp2WWbmzTt/oTCK3IWFxKy6D7rXYfSfwHab8kCcd uRVGB6GBO3QSJ/H5RKcjo3PQcmBFgva7W7ok4phiOT0UZOR7HZyTbySSiPnd1xv0naOy uIttqDa/rfOy4hfNCObW0HhjvG0e/oT4S495pS30lsacu8W4CmOTTY67m7FEc/KRHmXV S5EgKVkzu5KhqfJqjdtJK44slLqIHti+VoqwQa02OYldeWhqLXCksR6iL60rl6p7cSPX 7MwZcy1qFE3uapo+f1rmpZCsvPjMQ2SZywEU3X413O7n5eXKmnq1XgV984FR1r+1LbmN HV1w== X-Gm-Message-State: APjAAAUzsYGYOp3fYugNqCdVGj4ybtZEhQIIpXeuVoxIINW0kVqAKPpz y7AwDXTBEX2aoiRLROFL5Oiw/Q== X-Received: by 2002:a6b:fe0f:: with SMTP id x15mr2644657ioh.188.1569252990417; Mon, 23 Sep 2019 08:36:30 -0700 (PDT) Received: from [192.168.1.50] ([65.144.74.34]) by smtp.gmail.com with ESMTPSA id f12sm13027077iob.58.2019.09.23.08.36.29 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 23 Sep 2019 08:36:29 -0700 (PDT) Subject: Re: [PATCH v2] mm: implement write-behind policy for sequential file writes To: Linus Torvalds , Konstantin Khlebnikov Cc: linux-fsdevel , Linux-MM , Linux Kernel Mailing List , Michal Hocko , Dave Chinner , Mel Gorman , Johannes Weiner , Tejun Heo References: <156896493723.4334.13340481207144634918.stgit@buzz> From: Jens Axboe Message-ID: <1882a6da-a599-b820-6257-11bbac02b220@kernel.dk> Date: Mon, 23 Sep 2019 09:36:28 -0600 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.8.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 9/20/19 5:10 PM, Linus Torvalds wrote: > On Fri, Sep 20, 2019 at 4:05 PM Linus Torvalds > wrote: >> >> >> Now, I hear you say "those are so small these days that it doesn't >> matter". And maybe you're right. But particularly for slow media, >> triggering good streaming write behavior has been a problem in the >> past. > > Which reminds me: the writebehind trigger should likely be tied to the > estimate of the bdi write speed. > > We _do_ have that avg_write_bandwidth thing in the bdi_writeback > structure, it sounds like a potentially good idea to try to use that > to estimate when to do writebehind. > > No? I really like the feature, and agree it should be tied to the bdi write speed. How about just making the tunable acceptable time of write behind dirty? Eg if write_behind_msec is 1000, allow 1s of pending dirty before starting writbeack. -- Jens Axboe