Received: by 2002:a25:824b:0:0:0:0:0 with SMTP id d11csp1490029ybn; Wed, 25 Sep 2019 19:41:19 -0700 (PDT) X-Google-Smtp-Source: APXvYqylcwvahuQ33YBdqb+oj3gEPC5kZgIoYw10yQMGoebjQASDXsP5Yc1Pc+uhed964g4w0+rX X-Received: by 2002:a50:fa09:: with SMTP id b9mr1189694edq.165.1569465678907; Wed, 25 Sep 2019 19:41:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1569465678; cv=none; d=google.com; s=arc-20160816; b=xSVtwEp07R9JI7zMDJLiU5VqgK5iLRzbzJb6dxqLelmcNaj1JlYXcmEYiTF64F6w5d MlpPoPWUaRLX0jsg1qyDlpUZeoTk9XUerIhA1IPhB9xk/uXcQ2oWCBiVR6yrcaApO49U 45w0TaKggK1tuSIouIxoKy/oUSBI0VJtC9symOsuyNfT4C43q6zpB1jtfCzHKKNJI8gX HJ1rJgRVFSShhgldktvH21dPQbdDDzz3PbpTnJe9t1KOzW7P30bEkvh3ZWdAIhq5iz0Z BphLyGd3hwe9zWBxvtaRs6i+393GNWliU8ikmcJPAc7kYrQneV6t9d4uZwiAaZsIw9+A YDSw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature; bh=riBJUAnFgj9nDVI+i5Nb/om+rNkxXzEsRdcl+2egnO4=; b=0INE+wY1fVPKDRfoSCVb2jjVXQTRz7ZcwwP93U9fM2Imm+IG7Y9k0PRukLdlHi/ZAs cD19DYBxQrCz5wvNfQFqJWn/ndGR42Xq7852UKgBwpRkoM3OEihiCs5mKev/A+L1pUUs 3Oq0cqS9JNj0qjVyYUxNWQfmBKY5nmJw6V2WgocxMqTQd67OBB9LeOisygzzxiD2EAa6 X5e+tQXsCZLVIcuJ+ymsSb0n6OexQNfEbDIaWxbutDPLyuLmUkJPZPdrPBU40V/lNO3j rf82tWypTAx0iUgT3O5kEzVJJvcNTilINKFYfngPda/0VUGjO3a94qWoCHLsOdZHCr3g qShg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel-dk.20150623.gappssmtp.com header.s=20150623 header.b=s19vFEsh; 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 s1si353445ejf.305.2019.09.25.19.40.55; Wed, 25 Sep 2019 19:41:18 -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=@kernel-dk.20150623.gappssmtp.com header.s=20150623 header.b=s19vFEsh; 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 S2502253AbfIWTi2 (ORCPT + 99 others); Mon, 23 Sep 2019 15:38:28 -0400 Received: from mail-pl1-f174.google.com ([209.85.214.174]:46097 "EHLO mail-pl1-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726777AbfIWTi2 (ORCPT ); Mon, 23 Sep 2019 15:38:28 -0400 Received: by mail-pl1-f174.google.com with SMTP id q24so6908005plr.13 for ; Mon, 23 Sep 2019 12:38:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel-dk.20150623.gappssmtp.com; s=20150623; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=riBJUAnFgj9nDVI+i5Nb/om+rNkxXzEsRdcl+2egnO4=; b=s19vFEshxAW384piB/ezxkPFrjjo13YeQzWF9b9dbk7vhPuK6amZjiAprUOKGKulzy yXIjNkpzVOWZ9v7f+nSqJOGWNG/A8UlqcyzOiz2GG6BekJNXTU3gDTVIPxDHVX4PZQ6M Fg/AnN/Ig6SV3jwOioONtvHTgDNK9lzVDyB5IUVR+anl4me9busAYBKVPueDFmzF8XH9 r4uDtyUitwNi/mzP0GNiwWmKnO+luk3lIzz8VeRTc6NgUyZ/IHA+og0kAHD9KiyvyhXx aLNA2J5lzu8v3WYkt+1a3yCw74DidaaAyZ337wSYXbOrFipS3JbDFPaZmpYmGRp+I1Mx 8OBg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=riBJUAnFgj9nDVI+i5Nb/om+rNkxXzEsRdcl+2egnO4=; b=G2lR8n+VFM+qyN9Sxv7Dccst+qovnzzttPzjtE3Ml79EYM6x44kb7608w8U7dmhxqt /eEbCwC7ccVMsuBeWpG6b3hnYbZ4zXuN8coGdztcoCMZPgZQ7kZ882h/EAsh/qHfhWtp Wn3HbTgpALgZuhOxB9aTD4XVnyAW6j0EvGc+IXIwW9ZJuIBT0b54Kju4Jq2G2vsN93IU ZuVaxpZkTsxaxNOpYnb9Y3d+wPMBi25Itq5ZDWNhmU+oUEu536x6xuC7JXFV1t0M4zON FPkqRR8/JcN3BlEb+G8ok6dt/9sk5g9nI7/x4gtEPOHSEH04m4SD5RRKcuJKzLoCv1cs VTPQ== X-Gm-Message-State: APjAAAUnsZe1YiypnqDfxEjt04RlkfDzWwZw/G+23lXHe1Z2+6aCVOkc cbScF1ktcXxTnxA6mFLTw1Fm4g== X-Received: by 2002:a17:902:7846:: with SMTP id e6mr1464546pln.136.1569267507352; Mon, 23 Sep 2019 12:38:27 -0700 (PDT) Received: from [192.168.1.188] ([66.219.217.79]) by smtp.gmail.com with ESMTPSA id r186sm17219515pfr.40.2019.09.23.12.38.24 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 23 Sep 2019 12:38:26 -0700 (PDT) Subject: Re: Is congestion broken? To: Matthew Wilcox , 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, Omar Sandoval , Ming Lei References: <20190917115824.16990-1-linf@wangsu.com> <20190917120646.GT29434@bombadil.infradead.org> <20190918123342.GF12770@dhcp22.suse.cz> <6ae57d3e-a3f4-a3db-5654-4ec6001941a9@wangsu.com> <20190919034949.GF9880@bombadil.infradead.org> <20190923111900.GH15392@bombadil.infradead.org> From: Jens Axboe Message-ID: <45d8b7a6-8548-65f5-cccf-9f451d4ae3d4@kernel.dk> Date: Mon, 23 Sep 2019 13:38:23 -0600 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.8.0 MIME-Version: 1.0 In-Reply-To: <20190923111900.GH15392@bombadil.infradead.org> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 9/23/19 5:19 AM, Matthew Wilcox wrote: > > Ping Jens? > > On Wed, Sep 18, 2019 at 08:49:49PM -0700, Matthew Wilcox wrote: >> 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? Congestion isn't there anymore. It was always broken as a concept imho, since it was inherently racy. We used the old batching mechanism in the legacy stack to signal it, and it only worked for some devices. -- Jens Axboe