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.3 required=3.0 tests=DKIM_INVALID,DKIM_SIGNED, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,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 19629C04EBF for ; Mon, 23 Sep 2019 15:19:17 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id CEB7220820 for ; Mon, 23 Sep 2019 15:19:16 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="kZ9aYPC1" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org CEB7220820 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 53E596B0008; Mon, 23 Sep 2019 11:19:16 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 4EFD06B000E; Mon, 23 Sep 2019 11:19:16 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 3DF1B6B0010; Mon, 23 Sep 2019 11:19:16 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0066.hostedemail.com [216.40.44.66]) by kanga.kvack.org (Postfix) with ESMTP id 1BD6F6B0008 for ; Mon, 23 Sep 2019 11:19:16 -0400 (EDT) Received: from smtpin06.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay02.hostedemail.com (Postfix) with SMTP id B76486D70 for ; Mon, 23 Sep 2019 15:19:15 +0000 (UTC) X-FDA: 75966543870.06.match64_8b05bec2cb55d X-HE-Tag: match64_8b05bec2cb55d X-Filterd-Recvd-Size: 4704 Received: from mail-qk1-f195.google.com (mail-qk1-f195.google.com [209.85.222.195]) by imf01.hostedemail.com (Postfix) with ESMTP for ; Mon, 23 Sep 2019 15:19:15 +0000 (UTC) Received: by mail-qk1-f195.google.com with SMTP id u186so15785572qkc.5 for ; Mon, 23 Sep 2019 08:19:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=BvW4XrcJWJ2oTXG4RUy/CKw7q4mi60s93JIV6af2rgQ=; b=kZ9aYPC16gNRz8i6VP9vO/K4GSoP3wLXMPBBsvZekcVzoYCp/ynmSRnetM732vuOVt OplO7ek58sNltclJVPlLk3kXaWOY0/aKmhkIGg/ZzyowhzqQUH1704eivsGOhumopc0r QwYRF1yD3mYkDkXi89VJAG8h7DHCWbt3vyQGbhgozsC7BEsdu8Pa8lYemXVkNKbfNRyq 9z4vXH6unj3EQUqEzNrtgWBcwkyLUl7UQ0NNDlmcHhAcaHpgREmhh4sGDh3l/6f5ffVN FoJpE/QOETTp9mQCKVr5lc5jEkxhyokKa2fOASiGdNRQPkiyxgIBLN1SLU5HridFuQl+ JqLQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:date:from:to:cc:subject:message-id :references:mime-version:content-disposition:in-reply-to:user-agent; bh=BvW4XrcJWJ2oTXG4RUy/CKw7q4mi60s93JIV6af2rgQ=; b=Rux7xsjJvQU1rcCRQbAR29Vc5PCH1XDP+1HdvbrSJupUy7bwoBmcKm0iStFRW52hTv 2lQZeCyYI39357aABixWg9eSxTbrJJqE8L3Vd7wvAoOpSNCUb6I2mV3rzCyDBLHSCvl5 KrWbJMAQKmWzqT3HYPfpnc5hdXKcsjW7fUuBGX/mdb8mtR/i0QS9Dt7ssqoaXIaS7MkJ 5SLKAkcQF0hvK5CFwSMqseS9kxuzAGM9JIokt/hc6ODXVVArSt7EtrC0nt9qZwOt67mw HS4p/1U5cbUTStYsufYkda2C1qBIRetCIAhGAfajU+AFR8CZikMCa/XSwwI0GbBGT9VV V84w== X-Gm-Message-State: APjAAAWdIuT+nY+SevYPP/a4nM1MU0kkwNNZSM+ij4ekhnzxOGYBUjJU a0C9tSQgkk+lDzJf4wboAqs= X-Google-Smtp-Source: APXvYqwI5hVrjpHY8AFygfYIP1Y4nxJNb5fZko8g6cKD6P/lKgXS9sB7qIB/Epsms0XVHt1hGghPxg== X-Received: by 2002:a37:4794:: with SMTP id u142mr303789qka.265.1569251954464; Mon, 23 Sep 2019 08:19:14 -0700 (PDT) Received: from localhost ([2620:10d:c091:500::1:83ca]) by smtp.gmail.com with ESMTPSA id q44sm6356054qtk.16.2019.09.23.08.19.13 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 23 Sep 2019 08:19:13 -0700 (PDT) Date: Mon, 23 Sep 2019 08:19:12 -0700 From: Tejun Heo To: Konstantin Khlebnikov Cc: linux-fsdevel@vger.kernel.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org, Jens Axboe , Michal Hocko , Dave Chinner , Mel Gorman , Johannes Weiner , Linus Torvalds Subject: Re: [PATCH v2] mm: implement write-behind policy for sequential file writes Message-ID: <20190923151912.GG2233839@devbig004.ftw2.facebook.com> References: <156896493723.4334.13340481207144634918.stgit@buzz> <875f3b55-4fe1-e2c3-5bee-ca79e4668e72@yandex-team.ru> <20190923145242.GF2233839@devbig004.ftw2.facebook.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) 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: Hello, On Mon, Sep 23, 2019 at 06:06:46PM +0300, Konstantin Khlebnikov wrote: > On 23/09/2019 17.52, Tejun Heo wrote: > >Hello, Konstantin. > > > >On Fri, Sep 20, 2019 at 10:39:33AM +0300, Konstantin Khlebnikov wrote: > >>With vm.dirty_write_behind 1 or 2 files are written even faster and > > > >Is the faster speed reproducible? I don't quite understand why this > >would be. > > Writing to disk simply starts earlier. I see. > >Generic write-behind would definitely have other benefits and also a > >bunch of regression possibilities. I'm not trying to say that > >write-behind isn't a good idea but it'd be useful to consider that a > >good portion of the benefits can already be obtained fairly easily. > > > > I'm afraid this could end badly if each simple task like file copying > will require own systemd job and container with manual tuning. At least the write window size part of it is pretty easy - the range of acceptable values is fiarly wide - and setting up a cgroup and running a command in it isn't that expensive. It's not like these need full-on containers. That said, yes, there sure are benefits to the kernel being able to detect and handle these conditions automagically. Thanks. -- tejun