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 97656C433EF for ; Tue, 7 Dec 2021 13:51:22 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237353AbhLGNyv (ORCPT ); Tue, 7 Dec 2021 08:54:51 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35458 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232089AbhLGNyu (ORCPT ); Tue, 7 Dec 2021 08:54:50 -0500 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6675FC061574; Tue, 7 Dec 2021 05:51:20 -0800 (PST) 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=aFv8En/ZUuUzwcf8yZWk1KkdnnIDox4k6wRcsscE4CA=; b=caIUwf1+oqIuwD7WX8dHhC9UTo Y4yoywzSlSBcgtevqtNslcnAAKNAKrB3XEENVhXwsT6H4jzZsKi3EACKIDNhADJgm6Ea/4edVX4gi gitKf1XwVR6/1nPPS6XOWTdZQimhmZPVpewL8a38thcuEiH6UG58SYqpUZqB9l4CvDrlVGNf2bBGL nFa5ckxibtS6fYZmoX2Q4OSEitPQaqxl2jGHDgbiINmcJuLLNhmKfkQDXeueBTJAhrLByfovzu1Pg ztDh97cXtlzPOZgkbhVA8JgrWO1jjmNGE2mLKQyJMDHjkI+7Qt4BRiaIBdevwASn2WAKOXSFvsTlb Mx/owSRA==; Received: from j217100.upc-j.chello.nl ([24.132.217.100] helo=noisy.programming.kicks-ass.net) by casper.infradead.org with esmtpsa (Exim 4.94.2 #2 (Red Hat Linux)) id 1muasC-007Ofb-3U; Tue, 07 Dec 2021 13:51:13 +0000 Received: from hirez.programming.kicks-ass.net (hirez.programming.kicks-ass.net [192.168.1.225]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (Client did not present a certificate) by noisy.programming.kicks-ass.net (Postfix) with ESMTPS id 71DE5300237; Tue, 7 Dec 2021 14:51:12 +0100 (CET) Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id 5C17F20239D92; Tue, 7 Dec 2021 14:51:12 +0100 (CET) Date: Tue, 7 Dec 2021 14:51:12 +0100 From: Peter Zijlstra To: Miklos Szeredi Cc: Ingo Molnar , quic_stummala@quicinc.com, linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org, quic_pkondeti@quicinc.com, quic_sayalil@quicinc.com, quic_aiquny@quicinc.com, quic_zljing@quicinc.com, quic_blong@quicinc.com, quic_richardp@quicinc.com, quic_cdevired@quicinc.com, Pradeep P V K Subject: Re: [PATCH V1] fuse: give wakeup hints to the scheduler Message-ID: References: <1638780405-38026-1-git-send-email-quic_pragalla@quicinc.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Dec 07, 2021 at 02:45:49PM +0100, Peter Zijlstra wrote: > > What would be much nicer, is to look at all the threads on the waitq > > and pick one that previously ran on the current CPU if there's one. > > Could this be implemented? > > It would violate the FIFO semantics of _exclusive. That said, look at kernel/locking/percpu-rwsem.c:percpu_rwsem_wake_function() for how to do really terrible things with waitqueues, possibly including what you suggest.