Received: by 2002:a25:b323:0:0:0:0:0 with SMTP id l35csp2592562ybj; Mon, 23 Sep 2019 06:25:29 -0700 (PDT) X-Google-Smtp-Source: APXvYqwX65ZGFSW5DRrM5Qqd86EQTigpxMEjQGfwQEOfdLd8whJej9i7OmGdi+FSzoaF1eLjChtZ X-Received: by 2002:a50:fa83:: with SMTP id w3mr36378515edr.262.1569245129708; Mon, 23 Sep 2019 06:25:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1569245129; cv=none; d=google.com; s=arc-20160816; b=tuIpL82x/ORVt6ZLwUFiTipJ/LjZUPBoaox+ei9E3gdM9WeQCtejV6O1nJJJKoDPup kpd87dlIFQ11PFM2m/+/c6zzBXuIt1h6BrnYsmB5ca6+byKEsTu9yHyFW3z/xksmr7dO 8GKGBwS3WncnazV0xwY+x3xKSuuYTKMtsNV8fNit/O0cNPCBp0R0scYaxD1FhkRoERqq XfcHHoLR+0jzpPqSZ4p7Q2xTWM06gDWzAHIvRE892eUn4yhkM+oQRwFI9Lq6Jy1hITAo Zj2ie+QCtNj5CoxyLE7PpWWrze637oE9IhMdPiDQ6RWv12zEH0ZcVuIEKE73k17zbdIX RKMg== 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=mtHJRljpIthtHGh3XxE5kG38evjyZkXXa2KwhkF3cfE=; b=kZvqJyINDtKirQPTeaEmubeiPIgQqfrAqmD1jpbEuGak76AksSCMuEZENoGGpyhRL+ P0mXjJbikAaNnwyPEIL50NVxnDZujozk3uRuUA7fgWVl/bDtFauik/NFyJHzAQxrfJ+x N/66KaFAws2bzeyvCZV3oX4wu667u4r9kqE7la1qaYkelvAhL1BZAKWFILzOGcgqKIxo TJSM3ZlhhZXf8fZhB1LPDSjNXR6P68/Sg8sk6TnZTcEBc2tCwcbjy/ZAtWoC+0PcJMKK 1AeA8Eu7JuOMdEkLe8p8VKOpn/j4ns2rl6oDAEZauP40fG7/LDWAYLI+DQ1YXOjMuhcg n42w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=google header.b=Cc5gWnHv; 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 k6si5178705ejj.177.2019.09.23.06.25.05; Mon, 23 Sep 2019 06:25:29 -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=Cc5gWnHv; 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 S2407018AbfITXFk (ORCPT + 99 others); Fri, 20 Sep 2019 19:05:40 -0400 Received: from mail-lj1-f195.google.com ([209.85.208.195]:34558 "EHLO mail-lj1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2407011AbfITXFj (ORCPT ); Fri, 20 Sep 2019 19:05:39 -0400 Received: by mail-lj1-f195.google.com with SMTP id j19so7079204lja.1 for ; Fri, 20 Sep 2019 16:05:38 -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=mtHJRljpIthtHGh3XxE5kG38evjyZkXXa2KwhkF3cfE=; b=Cc5gWnHvSFkt/XOMA27VwmYwG7DVJmBzs0dIyEV6yq14mog53/7iNdQvPU8DH7UYCO WARG7/ZwIOBICzkQ8IQmexLNL7Ke5E6YBstlJKL71nq+d4fqB4s2qSAcsuYAbWAYHSRu k6yu+jXAPxOkH/L5OLNGuUB3Vt3R3U+Wxs+NE= 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=mtHJRljpIthtHGh3XxE5kG38evjyZkXXa2KwhkF3cfE=; b=IEnCzUJtKDNJoy6w2iAuhIv6sSK0cVmSWNNFYhQZQIzohtF8SJUgaNIse1KH41EO9f /l6IfiCoKuLGFWmG7XhzWr5VxPB1hVfM6hDNtfiuGD03Crwo6rinogFsZZAeRgX7livQ upLeZZ3G5SG2jfffVqaXJEo5w04JSIk9+64gXEG5dPILh50AiMh9Q79pTerLNok7Quai 3CB71turFWexfcQuvKuk4JwHpsEOwaO19j+pQXo919XdV+mWc5fN45l5sP0HKi3+FnIt b1IM9TXVLtICMMXGWgjpwIf+2n0DA4Ze2SiJLhJ/NaoxQNsuNEa6gSYYnm8GofhYk7oE Gvzg== X-Gm-Message-State: APjAAAUi8xWfQ6xYvArT17bM1rEACQdtKnCdsfLqI79prFul79siEKYh MAvgrSDMit2y2fsKksu0rgE6+JCx3aQ= X-Received: by 2002:a2e:9eca:: with SMTP id h10mr3222597ljk.32.1569020737143; Fri, 20 Sep 2019 16:05:37 -0700 (PDT) Received: from mail-lj1-f181.google.com (mail-lj1-f181.google.com. [209.85.208.181]) by smtp.gmail.com with ESMTPSA id h25sm824768lfj.81.2019.09.20.16.05.34 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 20 Sep 2019 16:05:35 -0700 (PDT) Received: by mail-lj1-f181.google.com with SMTP id l21so8583257lje.4 for ; Fri, 20 Sep 2019 16:05:34 -0700 (PDT) X-Received: by 2002:a2e:96d3:: with SMTP id d19mr1246398ljj.165.1569020733395; Fri, 20 Sep 2019 16:05:33 -0700 (PDT) MIME-Version: 1.0 References: <156896493723.4334.13340481207144634918.stgit@buzz> In-Reply-To: <156896493723.4334.13340481207144634918.stgit@buzz> From: Linus Torvalds Date: Fri, 20 Sep 2019 16:05:17 -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 12:35 AM Konstantin Khlebnikov wrote: > > This patch implements write-behind policy which tracks sequential writes > and starts background writeback when file have enough dirty pages. Apart from a spelling error ("contigious"), my only reaction is that I've wanted this for the multi-file writes, not just for single big files. Yes, single big files may be a simpler and perhaps the "10% effort for 90% of the gain", and thus the right thing to do, but I do wonder if you've looked at simply extending it to cover multiple files when people copy a whole directory (or unpack a tar-file, or similar). Now, I hear you say "those are so small these days that it doesn't matter". And maybe you're right. But partiocularly for slow media, triggering good streaming write behavior has been a problem in the past. So I'm wondering whether the "writebehind" state should perhaps be considered be a process state, rather than "struct file" state, and also start triggering for writing smaller files. Maybe this was already discussed and people decided that the big-file case was so much easier that it wasn't worth worrying about writebehind for multiple files. Linus