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 B49F0C61DA4 for ; Fri, 27 Jan 2023 14:12:06 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232638AbjA0OMF (ORCPT ); Fri, 27 Jan 2023 09:12:05 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55846 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231671AbjA0OLk (ORCPT ); Fri, 27 Jan 2023 09:11:40 -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 09FEA113C0; Fri, 27 Jan 2023 06:11:40 -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 B04182004A; Fri, 27 Jan 2023 14:11:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1674828698; 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=mSncck0uCNO0XEG+dAMJPtpF70wyeN5+vS8xanKFqy0=; b=C1YoRptlDUvtsZPxFNqni7kpmNoA5+rRt8/CIEw/LMiA/d9XXDsAxWTxbwAVOmi07VCulg IipcUh7HGReprrPS0A3KwTN54ZPuwyAR9p56cSkttQ5A0UAnWgx2XnXBeLOO3PpGMWzzFu +EaUCvzEhrzzuBA9tz3O87ZIe5AbYoU= 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 5ECC1138E3; Fri, 27 Jan 2023 14:11:38 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id yltBFprb02MQOwAAMHmgww (envelope-from ); Fri, 27 Jan 2023 14:11:38 +0000 Date: Fri, 27 Jan 2023 15:11:37 +0100 From: Michal =?iso-8859-1?Q?Koutn=FD?= To: Tvrtko Ursulin Cc: Intel-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org, cgroups@vger.kernel.org, linux-kernel@vger.kernel.org, Tejun Heo , Johannes Weiner , Zefan Li , Dave Airlie , Daniel Vetter , Rob Clark , =?iso-8859-1?Q?St=E9phane?= Marchesin , "T . J . Mercier" , Kenny.Ho@amd.com, Christian =?iso-8859-1?Q?K=F6nig?= , Brian Welty , Tvrtko Ursulin Subject: Re: [RFC 10/12] cgroup/drm: Introduce weight based drm cgroup control Message-ID: <20230127141136.GG3527@blackbody.suse.cz> References: <20230112165609.1083270-1-tvrtko.ursulin@linux.intel.com> <20230112165609.1083270-11-tvrtko.ursulin@linux.intel.com> <20230127130134.GA15846@blackbody.suse.cz> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="xs+9IvWevLaxKUtW" 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 --xs+9IvWevLaxKUtW Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Jan 27, 2023 at 01:31:54PM +0000, Tvrtko Ursulin wrote: > I think you missed the finish_suspend_scanning() part: >=20 > if (root_drmcs.suspended_period_us) > cancel_delayed_work_sync(&root_drmcs.scan_work); >=20 > So if scanning was in progress migration will wait until it finishes. Indeed, I've missed that. Thank you! > Not claiming I did not miss something because I was totally new with cgro= up > internals when I started working on this. So it is definitely useful to h= ave > more eyes looking. The custom with (especially v2, especially horizontal) migrations is that they're treated leniently to avoid performance costs. I'm afraid waiting for scan in can_attach() can propagate globally (via cgroup_update_dfl_csses() and cgroup_attach_lock()) sometimes. OTOH, unless I misunderstood, you need to cover explicit (not task but resource, when sending client FD around) migration anyway? (I.e. my suggestion would be to mutualy exclude scanning and explicit migration but not scanning and task migration in order to avoid possible global propagation.) Thanks, Michal --xs+9IvWevLaxKUtW Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature -----BEGIN PGP SIGNATURE----- iHUEARYIAB0WIQTrXXag4J0QvXXBmkMkDQmsBEOquQUCY9PblAAKCRAkDQmsBEOq ucw5AQC5ZB3HI12pF2NT0El6kZyt7tb80DxhDnscyavv+b0IdQEAiK5mjOqXAtP+ SYfNfDKskxKUJ4WdJnbrY4PbeeQlLwk= =Rwoe -----END PGP SIGNATURE----- --xs+9IvWevLaxKUtW--