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=-1.0 required=3.0 tests=MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS 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 2C17FC43331 for ; Fri, 3 Apr 2020 15:15:42 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id E7B5A20719 for ; Fri, 3 Apr 2020 15:15:41 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org E7B5A20719 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 6EB238E0009; Fri, 3 Apr 2020 11:15:41 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 69A5C8E0007; Fri, 3 Apr 2020 11:15:41 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 561438E0009; Fri, 3 Apr 2020 11:15:41 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0119.hostedemail.com [216.40.44.119]) by kanga.kvack.org (Postfix) with ESMTP id 3EE4A8E0007 for ; Fri, 3 Apr 2020 11:15:41 -0400 (EDT) Received: from smtpin22.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay01.hostedemail.com (Postfix) with ESMTP id ED7AE180AD804 for ; Fri, 3 Apr 2020 15:15:40 +0000 (UTC) X-FDA: 76666893240.22.sleet15_88c1708423a0f X-HE-Tag: sleet15_88c1708423a0f X-Filterd-Recvd-Size: 4198 Received: from mail-wm1-f67.google.com (mail-wm1-f67.google.com [209.85.128.67]) by imf40.hostedemail.com (Postfix) with ESMTP for ; Fri, 3 Apr 2020 15:15:38 +0000 (UTC) Received: by mail-wm1-f67.google.com with SMTP id z7so7486156wmk.1 for ; Fri, 03 Apr 2020 08:15:37 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=dYdrlxthVlPe+P4Bo/WAF0UgbtJBHrL0k9DfDVII2Po=; b=aWxcQwidF/1Jh7QwPO75mJj1QqdZ7jo6fDI4PLhKFCa08A+RAs9F7/AHcrczj7Dhda TRCkCkzdlA8KAhEKYUJDvNUhvb6Aq6ZCRyfOP2olMW9p8QZqVT5q/MYV7ukfKfFieugT ShLIa/dNLbESTS8dxgYLOtQD3V5MZTkyiIvAz9vxCGGde01LhNjp9l4eFPTsRqhQCzdA fyK8Xd+FpnPJQuzu21CDga+ResbhZc/lK7UbeGrgfbNpRVDawP/2SBeeLLS1EyoBtTm8 9KvDu7BD/zeylaPKT2MKxl12LXAhaOl8G0OKAE1GTfEHzbXbf/ZhhPo/U47Izs3/PToi gS3A== X-Gm-Message-State: AGi0PubCgdHsUnRKQ8j6unwPgrpo7oAUcP6v6WWcVeWxhosk2Typq4MS OsbPrcRFIZBSnYVQrQ1hV0w= X-Google-Smtp-Source: APiQypKaA3KcZEPlcMUrZKNSftTVMLDba3dS2MeXCo8avgaqUoIp3BTJpvRNOS+1foU8DFf0+2/hgg== X-Received: by 2002:a05:600c:2188:: with SMTP id e8mr9206977wme.121.1585926936992; Fri, 03 Apr 2020 08:15:36 -0700 (PDT) Received: from localhost (ip-37-188-180-223.eurotel.cz. [37.188.180.223]) by smtp.gmail.com with ESMTPSA id w4sm11668874wmc.18.2020.04.03.08.15.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 03 Apr 2020 08:15:36 -0700 (PDT) Date: Fri, 3 Apr 2020 17:15:34 +0200 From: Michal Hocko To: NeilBrown Cc: Trond Myklebust , "Anna.Schumaker@Netapp.com" , Andrew Morton , Jan Kara , linux-mm@kvack.org, linux-nfs@vger.kernel.org, LKML Subject: Re: [PATCH 1/2] MM: replace PF_LESS_THROTTLE with PF_LOCAL_THROTTLE Message-ID: <20200403151534.GG22681@dhcp22.suse.cz> References: <87tv2b7q72.fsf@notabene.neil.brown.name> <87v9miydai.fsf@notabene.neil.brown.name> <87sghmyd8v.fsf@notabene.neil.brown.name> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <87sghmyd8v.fsf@notabene.neil.brown.name> 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 Thu 02-04-20 10:53:20, Neil Brown wrote: > > PF_LESS_THROTTLE exists for loop-back nfsd, and a similar need in the > loop block driver, where a daemon needs to write to one bdi in > order to free up writes queued to another bdi. > > The daemon sets PF_LESS_THROTTLE and gets a larger allowance of dirty > pages, so that it can still dirty pages after other processses have been > throttled. > > This approach was designed when all threads were blocked equally, > independently on which device they were writing to, or how fast it was. > Since that time the writeback algorithm has changed substantially with > different threads getting different allowances based on non-trivial > heuristics. This means the simple "add 25%" heuristic is no longer > reliable. > > This patch changes the heuristic to ignore the global limits and > consider only the limit relevant to the bdi being written to. This > approach is already available for BDI_CAP_STRICTLIMIT users (fuse) and > should not introduce surprises. This has the desired result of > protecting the task from the consequences of large amounts of dirty data > queued for other devices. While I understand that you want to have per bdi throttling for those "special" files I am still missing how this is going to provide the additional room that the additnal 25% gave them previously. I might misremember or things have changed (what you mention as non-trivial heuristics) but PF_LESS_THROTTLE really needed that room to guarantee a forward progress. Care to expan some more on how this is handled now? Maybe we do not need it anymore but calling that out explicitly would be really helpful. -- Michal Hocko SUSE Labs