Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp28793637rwd; Wed, 5 Jul 2023 02:50:44 -0700 (PDT) X-Google-Smtp-Source: APBJJlFqLkqgVazK72vUDcJY9lG6pSuZIDd8dQJbDX987kjOae08qXia9JRX/0vkAuALtPGAvsx2 X-Received: by 2002:a17:90a:356:b0:262:d49f:ee63 with SMTP id 22-20020a17090a035600b00262d49fee63mr16026301pjf.11.1688550644481; Wed, 05 Jul 2023 02:50:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1688550644; cv=none; d=google.com; s=arc-20160816; b=sQhB57Ctp/OlSxgL5CbXy1rBInihiSWiJb/wcvTA1uPRXismAx/tE0igs3XBYwZd3S DYydfQtCOTCDzQCWzmscjDHRzWCQ8NVv5fP2iyTAthkVxFJjn/PCCL37sqgRQIuCTAp6 NW+Kio+EdTLWUY8GK+O1rPJQbnnqHdYg4sUnhlP4QI4JOco5YFf6ODHsjZ4RQdj0sGvT b+k82zJrfIoEAisE0d3VaqYsFusOanpJGczDxJ+UqvYrDR7L0ntUs1jShJ3AhZQt70el 6PTYe72aT2JLtKgsFArUusURYa4GiQ89JN7141WDU23512gMPJKfEoWkgB692D4eCFsc hy1g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=lt4FoXy4mNnBDTHwO7RpxArjIgn4jpLnPfJAc07tOaw=; fh=V0EURbwsq7Qih4wMvIjmsEfh6adx2pujvE2D4CqkJSY=; b=v6oUtyYVv8SCKatfGi0dpJLrAsT/eXCPYBQ+lFa7vXCXxZdFEsV0TWF44Ej2OMEvuR 78C3YdNwN80IJrBvBlbMSe0AWo2su2bhPKs+SKxvXiHceH7O5Yyhlj2ZDyvf0YJHbQJi 4D4roWZBYKOHqdEG5Gy6cGyPDTzTxTWxWnRFqREow53vuuK9gQu/TvtYXJZlht6oEyvM Jg6r8IOIdBHqG9VSZL7l0VCRpIgO+6XdBSW3AFsMFBPWpxnnnfLvSKRQu/evrvsAKKz+ 5wyHQ7LLu/O7Wn8II7shYzb/OdwrTeGFpUDasiOkmvX/089/oSyhJTO/lbPWWNDL5qQG m9+w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=desiato.20200630 header.b=cxZc6bSV; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id v69-20020a638948000000b00553ced07d17si22871827pgd.123.2023.07.05.02.50.30; Wed, 05 Jul 2023 02:50:44 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=desiato.20200630 header.b=cxZc6bSV; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230417AbjGEJkT (ORCPT + 99 others); Wed, 5 Jul 2023 05:40:19 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54382 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230439AbjGEJkQ (ORCPT ); Wed, 5 Jul 2023 05:40:16 -0400 Received: from desiato.infradead.org (desiato.infradead.org [IPv6:2001:8b0:10b:1:d65d:64ff:fe57:4e05]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AF2951711 for ; Wed, 5 Jul 2023 02:40:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=desiato.20200630; 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=lt4FoXy4mNnBDTHwO7RpxArjIgn4jpLnPfJAc07tOaw=; b=cxZc6bSVU91ZlMek6r7HQnXZEK 3iJ4uYLoTisPlvfjOlT61Tdx87raQna23rQFMILhZM/zES++pxNEHBe5/WTS5KTzcM1IEtZaLgVSn mxvzTmwDUt3NnBE3W9JK3LNngUeKcLUbbc6B5v0GE6rz0SVSXs1LRPUFENqKxav6rxDYW2o4A2oVg zAXFeyxFtC/kIH2PqF4X7oeGehS2x97UqEP75rxaOePJ64Ah+Cou2BnZWVPl4XSC+S6d109SckC0r WhWbFpGC29o65uUfDa6d0GI5OB49DKRWhpttKsFy2ZDpVnRrIIZtWKbcilILKn4hTWyMvQMTRHlDv +yM6LJlA==; Received: from j130084.upc-j.chello.nl ([24.132.130.84] helo=noisy.programming.kicks-ass.net) by desiato.infradead.org with esmtpsa (Exim 4.96 #2 (Red Hat Linux)) id 1qGyxO-00C4EN-12; Wed, 05 Jul 2023 09:39:59 +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) server-digest SHA256) (Client did not present a certificate) by noisy.programming.kicks-ass.net (Postfix) with ESMTPS id 933B930036B; Wed, 5 Jul 2023 11:37:52 +0200 (CEST) Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id 6B62C2028F056; Wed, 5 Jul 2023 11:37:52 +0200 (CEST) Date: Wed, 5 Jul 2023 11:37:52 +0200 From: Peter Zijlstra To: Waiman Long Cc: Ingo Molnar , Juri Lelli , Vincent Guittot , Dietmar Eggemann , Steven Rostedt , Ben Segall , Mel Gorman , Daniel Bristot de Oliveira , Valentin Schneider , linux-kernel@vger.kernel.org, Phil Auld , Brent Rowsell , Peter Hunt Subject: Re: [PATCH] sched/core: Use empty mask to reset cpumasks in sched_setaffinity() Message-ID: <20230705093752.GW4253@hirez.programming.kicks-ass.net> References: <20230628211637.1679348-1-longman@redhat.com> <20230703102604.GC4253@hirez.programming.kicks-ass.net> <5bc41342-5ba6-68e9-8315-9e5cef65d102@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <5bc41342-5ba6-68e9-8315-9e5cef65d102@redhat.com> X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_NONE,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Jul 03, 2023 at 10:55:02AM -0400, Waiman Long wrote: > Our OpenShift team has actually hit a problem with the recent persistent > user provided cpu affinity change because they are relying on the fact that > moving a task to a different cpuset will reset cpu affinity to the cpuset > default which is no longer true. That is the main reason behind this patch > to provide a way to reset cpu affinity to the cpuset default. Where is the sched_setaffinity() in that story? So somewhere this thing did a sched_setaffinity() and then starts playing with cpusets. Instead of adding more sched_setaffinity() calls, can't it just remove some?