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 Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id DC5CDCD68E4 for ; Tue, 10 Oct 2023 03:58:25 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1442082AbjJJD6Z (ORCPT ); Mon, 9 Oct 2023 23:58:25 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37256 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1441973AbjJJD6Y (ORCPT ); Mon, 9 Oct 2023 23:58:24 -0400 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8101492; Mon, 9 Oct 2023 20:58:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.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; bh=4gNQmNubIN/TBepTlzBZaBxA4jjJVnAEm3nKv56gu28=; b=lI5Bw8KIWB5ZsFRFGMi6BGGMWF ZdN2uYMoYxzFmMf154Bbrb6BxetbqIcXc4zdguYF/cYSzs3HUoDfrU0M+yv+RcNJ5vqOIcUirBrxM q5XZKPnayu/uk5a/tHzH0NycAsKNLdQ1rP3yum1YVQWyqK1Dj4cZNxPk0JhLFBDvUxNgLNSlVykLO 6IpsXvyuheU6TLg3ushd2jYq2j7aFASGYPIwNUE2U1/dB2Oc1sgEbXipKii01NjZGUDRxGXKRZYz3 vopBhBePi88Er41e3iXTIJaIElpWZtjDqS5jki8zbB/hAUUF5LAEjPRggq0VjByXxWNsQ1zF62MUS sKBwGsmg==; Received: from willy by casper.infradead.org with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1qq3sc-002HYA-JP; Tue, 10 Oct 2023 03:57:58 +0000 Date: Tue, 10 Oct 2023 04:57:58 +0100 From: Matthew Wilcox To: Bin Lai Cc: mingo@redhat.com, peterz@infradead.org, juri.lelli@redhat.com, vincent.guittot@linaro.org, akpm@linux-foundation.org, dietmar.eggemann@arm.com, rostedt@goodmis.org, bsegall@google.com, mgorman@suse.de, bristot@redhat.com, vschneid@redhat.com, linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-mm@kvack.org, Bin Lai Subject: Re: [PATCH] sched/wait: introduce endmark in __wake_up_common Message-ID: References: <20231010032833.398033-1-robinlai@tencent.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20231010032833.398033-1-robinlai@tencent.com> Precedence: bulk List-ID: X-Mailing-List: linux-fsdevel@vger.kernel.org On Tue, Oct 10, 2023 at 11:28:33AM +0800, Bin Lai wrote: > Without this patch applied, it can cause the waker to fall into an > infinite loop in some cases. The commit 2554db916586 ("sched/wait: Break > up long wake list walk") introduces WQ_FLAG_BOOKMARK to break up long > wake list walk. When the number of walked entries reach 64, the waker > will record scan position and release the queue lock, which reduces > interrupts and rescheduling latency. Maybe we could try removing bookmarks instead? There was a thread a while ago where we agreed they weren't actually useful any more. Patches to follow ...