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 8F4AFC4332F for ; Wed, 16 Nov 2022 09:57:47 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230156AbiKPJ5q (ORCPT ); Wed, 16 Nov 2022 04:57:46 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39900 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229715AbiKPJ5o (ORCPT ); Wed, 16 Nov 2022 04:57:44 -0500 Received: from smtp-out2.suse.de (smtp-out2.suse.de [IPv6:2001:67c:2178:6::1d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3BE9928B for ; Wed, 16 Nov 2022 01:57:43 -0800 (PST) Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id EBE541F926; Wed, 16 Nov 2022 09:57:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1668592661; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=czxPe4ItB5tqe9afE5IZdwvdY/jMVJmAcwvPJ6Y6Tu0=; b=m0Qo8RMB/oMhDn8oGxmg2DVkQygA+2LObXYFpincRsODrlvbiFzDwmVc8PamueJBfXD96x O9bhIWXaIm8S+7VV4TGEoqTIYp+8B2gT+iDfzIKxFv0n6+piuTInzjiJ3s4mXj+48LI1pn gRzS4ZuO66dpE0yytWxAIJGPdkp/muw= Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id B89AF134CE; Wed, 16 Nov 2022 09:57:41 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id peNMLBW0dGMdQwAAMHmgww (envelope-from ); Wed, 16 Nov 2022 09:57:41 +0000 Date: Wed, 16 Nov 2022 10:57:40 +0100 From: Michal =?iso-8859-1?Q?Koutn=FD?= To: Josh Don Cc: Ingo Molnar , Peter Zijlstra , Juri Lelli , Vincent Guittot , Dietmar Eggemann , Steven Rostedt , Ben Segall , Mel Gorman , Daniel Bristot de Oliveira , Valentin Schneider , linux-kernel@vger.kernel.org Subject: Re: [PATCH v2] sched: async unthrottling for cfs bandwidth Message-ID: <20221116095740.GA29859@blackbody.suse.cz> References: <20221026224449.214839-1-joshdon@google.com> <20221102165922.GA31833@blackbody.suse.cz> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="xHFwDpU9dbj6ez1V" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --xHFwDpU9dbj6ez1V Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Tue, Nov 15, 2022 at 07:01:31PM -0800, Josh Don wrote: > After more thought, I realized that we can't reuse the throttled_list > list_head, since that would potentially break the lockless traversal > of a concurrent list_for_each_entry_rcu() (ie. if we removed the > element from the throttled list and then added it to the CSD list). I see, the concurrent RCU traversal is a valid point for the two heads. What does it mean for SCHED_WARN_ON in __unthrottle_cfs_rq_async()? IIUC, if the concurrency of cfs_b->throttled_cfs_rq list is expected (hence I'm not sure about the SCHED_WARN_ON), then it may happen that __unthrottle_cfs_rq_async is called on cfs_rq that's already on rq->cfsb_csd_list (there's still rq lock but it's only help inside cfs_b->throttled_cfs_rq iteration). Thanks, Michal --xHFwDpU9dbj6ez1V Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature -----BEGIN PGP SIGNATURE----- iHUEARYIAB0WIQTrXXag4J0QvXXBmkMkDQmsBEOquQUCY3S0AwAKCRAkDQmsBEOq uXbpAQCLqagcMyDb165HxJhOfjWGUcIvJuvulqJGwtktzGZyBwD/YOkxd/uCb5bF WQXMRrjyXFnOnEtWRMsY6VbAGWXdkg8= =kRZ+ -----END PGP SIGNATURE----- --xHFwDpU9dbj6ez1V--