Received: by 2002:a25:b323:0:0:0:0:0 with SMTP id l35csp1800672ybj; Sun, 22 Sep 2019 12:12:43 -0700 (PDT) X-Google-Smtp-Source: APXvYqzGjWM/7kGrUrkMgNW+IbACMoijdXhDqiEqLlOy2DShHh8JnwS1XY65t+PM/1LNR4aOCBzs X-Received: by 2002:aa7:c743:: with SMTP id c3mr27056636eds.241.1569179563271; Sun, 22 Sep 2019 12:12:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1569179563; cv=none; d=google.com; s=arc-20160816; b=qGuL0bb+RT/QsiljzL+1RZwvZFF+zTh6805QWu3EqihdaBLNmsC4wt5ORno6EPIjLo CeNcpSjFri32AEZFbCJjm05GnOgocdMlJJ6Z7w0+EPL22OVzqDULytupHXhQDtBDjEn9 jV79d61rUPRqYgb4T6h/tvU9djfYYlC5wcuOUPX4UPBIxyKge5YtVWFkvo+OqtkhUuyb t9q0LYBmctGw3e22sGTdIh6jjS+rCkpKG4V+J4nfrNY2JTj4yWg/HXpLLxpqZ1ndizef w/Etwpiov7zwjLQH3j8Z4hVazTA3PRt4i+K+zAt+u6GUaiA90mvNV8NdokSfzHN8oaB3 GEzw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=tO+3q5x038gSPZF/nLZWoOveo/vi3BJr9fEYGq5u1Qs=; b=YQfvUGF/32ve3cOhShJiY3fzVyPZ2tEXwKNyClSk0msSYGR3UdZT7ySzWOd+nUD1kZ 5utzHNdKvqOl1cy799jWpcCWTEQQIGRASaVmDgE+HkfgYVG4ppGi+N4uK0PI9EP4slMU bheJk0yUNB0a/E/K8pKhoc2K35Q5H9F5DrhJ9tt2QQpHXIi/STnEruCEmMq1dEKMsrR2 GzR7sRKiNggn0WkpDeixNVInYOKtucDY9QsVG0JV7dztOZhXvYl8bD+OtjPICmupYnnU AD9Qewxjt741UTj26RxmXZMpDTafSpWdJ3erY/ybl2pJUKS6jNbbJVIVT4jJrOaqUEhJ a6xw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=google header.b=b0bLoLz9; 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 l19si5203879eds.389.2019.09.22.12.12.20; Sun, 22 Sep 2019 12:12:43 -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=@linux-foundation.org header.s=google header.b=b0bLoLz9; 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 S2407065AbfITXKY (ORCPT + 99 others); Fri, 20 Sep 2019 19:10:24 -0400 Received: from mail-lf1-f68.google.com ([209.85.167.68]:33803 "EHLO mail-lf1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2407054AbfITXKY (ORCPT ); Fri, 20 Sep 2019 19:10:24 -0400 Received: by mail-lf1-f68.google.com with SMTP id r22so6145806lfm.1 for ; Fri, 20 Sep 2019 16:10:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux-foundation.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=tO+3q5x038gSPZF/nLZWoOveo/vi3BJr9fEYGq5u1Qs=; b=b0bLoLz9YWB+dnb6SUOQYyE1UG7Fm/CiRt9E6LOt5jNDkZBpysWuFmg6W9pLGQLDKb WEpU9p2xmLJOYOSUMCpecUg+sWWLcFbpwLUo70evRNP41Q3StF1A42Il21OBbR6H99xJ iNnVTFFFgkWYCoAEIw6rXlpjOGG/wqJpFAmnU= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=tO+3q5x038gSPZF/nLZWoOveo/vi3BJr9fEYGq5u1Qs=; b=Yh6Ieipxe62WFX2STGaDnahBQ8Kja9DbVm3ToM4+xhhId/hHm6l9GlWJe3Cr+BjH0X 0MnWOOXhabtJwP24O/2UNkEFQU5ypzBEdoVyeyeWgvaSolb/yq7DLE1JDOKsQAorTj+j tMtKN1CxwqvBduM7WbcsuJAWJQuyTwYR1rk9wY0Y8YV4t/xQHZcDJijweV9CDMVDRPNW kMT6ifNGPtC1+z8KBySqwOd81NuLiZeH9ya3gqwI3CXEzUL5qWxnmqZkeevCnjyMq+H+ M8ZjDQwehJUcelG5wWJfedHUUclkexlUpbOW2i3dCZVFJBzBFatRXKQD3SCE3MJfs3fP Ierw== X-Gm-Message-State: APjAAAVq0K+tE7cSGlkVALJu4+ML58S1FbLoly9+o3EGPL2/gCoVi/zW GzP5oHO09LbGwbFKMTJemYeVY6SqybM= X-Received: by 2002:ac2:4551:: with SMTP id j17mr9952448lfm.81.1569021021773; Fri, 20 Sep 2019 16:10:21 -0700 (PDT) Received: from mail-lj1-f173.google.com (mail-lj1-f173.google.com. [209.85.208.173]) by smtp.gmail.com with ESMTPSA id e7sm757267lfn.12.2019.09.20.16.10.18 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 20 Sep 2019 16:10:18 -0700 (PDT) Received: by mail-lj1-f173.google.com with SMTP id q64so8519860ljb.12 for ; Fri, 20 Sep 2019 16:10:18 -0700 (PDT) X-Received: by 2002:a2e:3e07:: with SMTP id l7mr10586601lja.180.1569021018229; Fri, 20 Sep 2019 16:10:18 -0700 (PDT) MIME-Version: 1.0 References: <156896493723.4334.13340481207144634918.stgit@buzz> In-Reply-To: From: Linus Torvalds Date: Fri, 20 Sep 2019 16:10:01 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v2] mm: implement write-behind policy for sequential file writes To: Konstantin Khlebnikov Cc: linux-fsdevel , Linux-MM , Linux Kernel Mailing List , Jens Axboe , Michal Hocko , Dave Chinner , Mel Gorman , Johannes Weiner , Tejun Heo Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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? Linus