From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.2 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 63AF7C4CECF for ; Mon, 23 Sep 2019 15:36:34 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 3A3732089F for ; Mon, 23 Sep 2019 15:36:34 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=kernel-dk.20150623.gappssmtp.com header.i=@kernel-dk.20150623.gappssmtp.com header.b="W1akfRBT" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727809AbfIWPgd (ORCPT ); Mon, 23 Sep 2019 11:36:33 -0400 Received: from mail-io1-f65.google.com ([209.85.166.65]:41719 "EHLO mail-io1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725911AbfIWPgc (ORCPT ); Mon, 23 Sep 2019 11:36:32 -0400 Received: by mail-io1-f65.google.com with SMTP id r26so34438951ioh.8 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=ZvJX+WlbiR2tCLtWeoeSmMubgtbUF26ZKC81hQwdnmqIfew3ZfKUp48B50XHxpibkH 6ZpCqYb+CGTPkpD46I+8K8TidLaa4IqQ7qUyUlR+E7t7ya4BcFl/7R7WTU/lGphsow85 G+jZz0zJgzPUw7/yIVy9aEqrOUhvN3MtY7rybpgAbh8Do6gn4JqE5xolgFHYWXH5fjdP LJ/F1yX+771XApQvISd070mr1431DxCovuk7Ws12Wth+3qcCLarJKcH1fyxDIji0FJjG 7Djfvyj2ICDp4GGFuTNIJkgF6hgvo/OtrC8Nd1MOiJI7Zs16yiPhtUVaPZn9yMuyOj9u 2UNA== X-Gm-Message-State: APjAAAXTgGaaMIZxO3kwGCj97iMUxg9/5GUqClr+28f5CY9AAgaD0LDf H/tJS0oWdCko4Ar4Xs/T0rHXQg== X-Google-Smtp-Source: APXvYqyyeaV/OyAPAqNs2hYQiUiDuqJkFJdUHUadcPjHwBqQTyy/QJlYetTj8pSmsVvgbE3+nY2hWQ== 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-fsdevel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fsdevel@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