Received: by 2002:a25:c593:0:0:0:0:0 with SMTP id v141csp525860ybe; Wed, 18 Sep 2019 22:44:48 -0700 (PDT) X-Google-Smtp-Source: APXvYqz6vtSgHLb5IHLijJEOpLzR4IbLDAhH34W/9G7uq/BDleeYDYB1hZsvSmg6297J5mXHyKIx X-Received: by 2002:a50:b7ed:: with SMTP id i42mr13695590ede.52.1568871888145; Wed, 18 Sep 2019 22:44:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1568871888; cv=none; d=google.com; s=arc-20160816; b=T6shsd7Xjzi4ROksKeCWF/22hHwH4do1bmcr+yBnkZucsb2YgHEYI8WSSuUYqmvFab w1NWWVu0Qq7lH4lJdxlL0JNkW5uM/B4UZxCt8XW59HS5oCUGv8KvRdY8TblKmH5ccQg5 vqONeIYwBGezruj9GO2RbIeKfoWp76GbussPtYXd8oSnejwfR/TuXfQYUz/5hhGE5s7o KqPEiHPoe4+TLhwirCW3KlXTObyzNcPJQ/O8coMvISsjllxmuF82F1HhiCJRrCFXl6Py //SMTpWtmu9SoWqDqGzFy/M8+z0tkVwN7ThEwaxYq/IqCKXol5U7xsyIkDoPZw1YGdtp QpCA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=dIaTx+Cw6W1z2kh8erm4sN6OIGIJmSGITOU+49mfvpU=; b=K4ZXuvNQQzeIQLQ/Z07WIq7kN6PKTTx69Wb3wyqpgwnc4UVjP4lsZ55aD1pBdxGOLb mQ6JeAzEj920gTSaYM9r669/uU2j+wjCTb+FC6XWg3ov6H1J7eLEaDWyxpeFSlfXhqza FA6bqsOzPUnWUT9Vj2lhcrv1/duydHCH1jEu7deRiAfQONt058pbyQydmajcHzxAbHa/ qJKvcP63n2dAbih3hXVioEoyEMkdcWG5N1x84lylQj2mfYM6hPK28r8UViqu8ISk0DCX SeCgA4VPIGEbfZ4RWkzZZKRo90BcL5igUduPBXaMW3HskZ7HC3r2pMUeHtE4IgfqpEbP ZhCQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b="Jy0Yk/Rd"; 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 f13si4339566edr.445.2019.09.18.22.44.25; Wed, 18 Sep 2019 22:44:48 -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=fail header.i=@infradead.org header.s=bombadil.20170209 header.b="Jy0Yk/Rd"; 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 S1731743AbfISDt6 (ORCPT + 99 others); Wed, 18 Sep 2019 23:49:58 -0400 Received: from bombadil.infradead.org ([198.137.202.133]:41048 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728861AbfISDt6 (ORCPT ); Wed, 18 Sep 2019 23:49:58 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20170209; h=In-Reply-To:Content-Type:MIME-Version :References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=dIaTx+Cw6W1z2kh8erm4sN6OIGIJmSGITOU+49mfvpU=; b=Jy0Yk/Rd26StseUe6OJL3CH6q 2rTWzns+Br6nwBlrgwrUu0ms90xlJr2TUerpgXXrz3lK8w5KV+3tIeEg6+KFsKaOz/uUujXRzzOIi x9gskoDIrBNBg68RTQMrxd/SA9PnC9s/6+i3FJGwd8ncqXM94dw2rpD1YDWcvSkYpN7n72lWLtjCt DOcRPY0cMNpt4A0pi7oVgmfYS1EmgLXpDfCkQYIBt4B0W8vSTbLGNisKGpEgyREPE+EkknGfsmLBy h1zZaNLoTx33ojutcoknm9FlLeJxxSEGHJ1Byox5ClyJI7tcIfK2Zmi/SiDm2I069p0DauYfEJ36o KtGKJB0Gw==; Received: from willy by bombadil.infradead.org with local (Exim 4.92.2 #3 (Red Hat Linux)) id 1iAnS1-0004CN-AJ; Thu, 19 Sep 2019 03:49:49 +0000 Date: Wed, 18 Sep 2019 20:49:49 -0700 From: Matthew Wilcox To: Lin Feng Cc: Michal Hocko , corbet@lwn.net, mcgrof@kernel.org, akpm@linux-foundation.org, linux-kernel@vger.kernel.org, linux-mm@kvack.org, keescook@chromium.org, mchehab+samsung@kernel.org, mgorman@techsingularity.net, vbabka@suse.cz, ktkhai@virtuozzo.com, hannes@cmpxchg.org, Jens Axboe , Omar Sandoval , Ming Lei Subject: Re: [PATCH] [RFC] vmscan.c: add a sysctl entry for controlling memory reclaim IO congestion_wait length Message-ID: <20190919034949.GF9880@bombadil.infradead.org> References: <20190917115824.16990-1-linf@wangsu.com> <20190917120646.GT29434@bombadil.infradead.org> <20190918123342.GF12770@dhcp22.suse.cz> <6ae57d3e-a3f4-a3db-5654-4ec6001941a9@wangsu.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <6ae57d3e-a3f4-a3db-5654-4ec6001941a9@wangsu.com> User-Agent: Mutt/1.12.1 (2019-06-15) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Sep 19, 2019 at 10:33:10AM +0800, Lin Feng wrote: > On 9/18/19 20:33, Michal Hocko wrote: > > I absolutely agree here. From you changelog it is also not clear what is > > the underlying problem. Both congestion_wait and wait_iff_congested > > should wake up early if the congestion is handled. Is this not the case? > > For now I don't know why, codes seem should work as you said, maybe I need to > trace more of the internals. > But weird thing is that once I set the people-disliked-tunable iowait > drop down instantly, this is contradictory to the code design. Yes, this is quite strange. If setting a smaller timeout makes a difference, that indicates we're not waking up soon enough. I see two possibilities; one is that a wakeup is missing somewhere -- ie the conditions under which we call clear_wb_congested() are wrong. Or we need to wake up sooner. Umm. We have clear_wb_congested() called from exactly one spot -- clear_bdi_congested(). That is only called from: drivers/block/pktcdvd.c fs/ceph/addr.c fs/fuse/control.c fs/fuse/dev.c fs/nfs/write.c Jens, is something supposed to be calling clear_bdi_congested() in the block layer? blk_clear_congested() used to exist until October 29th last year. Or is something else supposed to be waking up tasks that are sleeping on congestion?