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 219FDC4CEC4 for ; Mon, 23 Sep 2019 15:36:33 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id CBDB720820 for ; Mon, 23 Sep 2019 15:36:32 +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" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org CBDB720820 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=kernel.dk Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 7550E6B000A; Mon, 23 Sep 2019 11:36:32 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 705386B000C; Mon, 23 Sep 2019 11:36:32 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 5F3FB6B0010; Mon, 23 Sep 2019 11:36:32 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0183.hostedemail.com [216.40.44.183]) by kanga.kvack.org (Postfix) with ESMTP id 3F2266B000A for ; Mon, 23 Sep 2019 11:36:32 -0400 (EDT) Received: from smtpin19.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay02.hostedemail.com (Postfix) with SMTP id D20F6381E for ; Mon, 23 Sep 2019 15:36:31 +0000 (UTC) X-FDA: 75966587382.19.hot91_9043566a6d34c X-HE-Tag: hot91_9043566a6d34c X-Filterd-Recvd-Size: 4526 Received: from mail-io1-f68.google.com (mail-io1-f68.google.com [209.85.166.68]) by imf01.hostedemail.com (Postfix) with ESMTP for ; Mon, 23 Sep 2019 15:36:31 +0000 (UTC) Received: by mail-io1-f68.google.com with SMTP id a1so34517741ioc.6 for ; Mon, 23 Sep 2019 08:36:31 -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=EkVGlAnj9YJi1jgiRIaV7N62zj873Ug3UYGk/AOOFM7XeF1SMQt+PMubU7ccRJ7ltP 2xN905SHWDrIcwHdTI1VrnownSYxJMcvDMUu3emqDOupHXDJ7UnUdxRSVRcnz55dEQf5 3tl/PrAzUNri+xyDXgGRAvWuolywS0rICnuaPo3Q3k+ZO7jaNYyEBfyvSrxww7i/tbTU UA4Z4r7p3REmFldp+ku5PDi9RUVdJoaXC2GYm6rxpwSsEtIumoWtSAj/246wFVvdzR6v tdC63WOGkGVh90yrA8C3J2ANMV0d24LXxvsR8moewSrYpC7BhPJ/YslDGa0aZya87yGK +kEA== X-Gm-Message-State: APjAAAWQ14lv6ZdVqfMBOTFVS/rGjErm38N/yJVQ2eaU7JOVeKdLuqle 1vZgFsY/xcgiHY+nCc3wyyYe1H/fTQuMZA== 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 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: 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