Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp1627093ybb; Thu, 26 Mar 2020 04:30:20 -0700 (PDT) X-Google-Smtp-Source: ADFU+vsIPFYmEe0OKIxMNZhSjfv/bhFOviX7yzbd6p65BsMxOImn4EuAw8lMZYQf/ZUUZbW6iD1h X-Received: by 2002:aca:7517:: with SMTP id q23mr1422176oic.23.1585222220119; Thu, 26 Mar 2020 04:30:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1585222220; cv=none; d=google.com; s=arc-20160816; b=O/5CdEcyQsHfwil9O2hEXzAiXIleUXIuyRw2VlH4EY9TiLBgbpkC8fIZZAAc+5HycO 8cvrXT+E/lcEPRPK7v+ajCsyF7/ANP6j/iaB3kj+99pJbHBA3NjGXit3alhhfu+Etwyc sU63xTjmkfzmJZaxcFCt5fCyziJif+gLofEoxQgs5meetjWugQQ8bxG2eYlZUskPVlef ZgX6Z/ii1GwcXnCiB/L1sx31mUZXDDmXWIsWZKBlr41XvBzUBgSOg2Qgb4usfvGKTVEo 7S0Ph82tQalEdUvzrbdf657Kr1hpwktaSPGdTyn0zow6t+Rbq0eMfUYgGbWgkc2T5Cs3 0eGQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=xICPx43XxVzlN0L4ORBO4gJ+FNAFRx/9GJmSwyKx370=; b=x5ziO6gbWsADGD4Qgq/DHbNYBBbSH04H46vquHMmPqM+YFEM6YzMSM0FgOz2DxiQ13 jeG1uWTjKMpZc3p38E86v+YACpFqSCufOzUa8mSs/1HwRosQN1pcsy9YJBEg5vZtT2ai 8LE3glxvsNIte9Ix7mmnqE5uMwUW1THQee3ehwwVts90/4WKCvJqQTDojNkPuM30I5ZJ Z8eMJaroAZyGj8InhS4FWp6Fe3/QtPO+EripnCAt7G8XXY7YWIbV0CSndvv8Q6PBExkz BH4HZs5Kr2eOT0pEZyqvsSq9emdv7QAKv9925KDvEqdnfLG2RcylwasxjaR3CmYmvmLy c6cQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=jVEOvkyT; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id o124si989815oib.111.2020.03.26.04.30.07; Thu, 26 Mar 2020 04:30:20 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=jVEOvkyT; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727970AbgCZL3U (ORCPT + 99 others); Thu, 26 Mar 2020 07:29:20 -0400 Received: from us-smtp-delivery-74.mimecast.com ([216.205.24.74]:38793 "EHLO us-smtp-delivery-74.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727560AbgCZL3T (ORCPT ); Thu, 26 Mar 2020 07:29:19 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1585222158; h=from:from:reply-to:subject:subject: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=xICPx43XxVzlN0L4ORBO4gJ+FNAFRx/9GJmSwyKx370=; b=jVEOvkyT12mArPy0tQugo/D/JvdDFFXkk7i5vNjxjxbSgpuaR1sxH40mFTqJvRDRm5flur JEvLTEVE50hrFevec8IHcILaQYtRteHhyQflNWdIsm3oqH73Hmc9sEvOv1RU+bf+krL683 INRWj2GgL7Mf2/FMkwI8QsuNbE3+Eg4= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-211-Y3J3kDn2MZi8GqVhdry_Zw-1; Thu, 26 Mar 2020 07:29:13 -0400 X-MC-Unique: Y3J3kDn2MZi8GqVhdry_Zw-1 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 2C44C8024F4; Thu, 26 Mar 2020 11:28:50 +0000 (UTC) Received: from fuller.cnet (ovpn-116-39.gru2.redhat.com [10.97.116.39]) by smtp.corp.redhat.com (Postfix) with ESMTPS id DD2EA1036B44; Thu, 26 Mar 2020 11:28:49 +0000 (UTC) Received: by fuller.cnet (Postfix, from userid 1000) id C6BA44198B39; Thu, 26 Mar 2020 08:28:32 -0300 (-03) Date: Thu, 26 Mar 2020 08:28:32 -0300 From: Marcelo Tosatti To: David Laight Cc: Thomas Gleixner , Chris Friesen , "linux-kernel@vger.kernel.org" , Christoph Lameter , Jim Somerville , Andrew Morton , Frederic Weisbecker , Peter Zijlstra Subject: Re: [PATCH v2] isolcpus: affine kernel threads to specified cpumask Message-ID: <20200326112832.GC17019@fuller.cnet> References: <20200323135414.GA28634@fuller.cnet> <87k13boxcn.fsf@nanos.tec.linutronix.de> <87imiuq0cg.fsf@nanos.tec.linutronix.de> <20200324152016.GA25422@fuller.cnet> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Mar 25, 2020 at 06:05:27PM +0000, David Laight wrote: > From: Marcelo Tosatti > > Sent: 24 March 2020 15:20 > > > > This is a kernel enhancement to configure the cpu affinity of kernel > > threads via kernel boot option isolcpus=no_kthreads,, > > > > When this option is specified, the cpumask is immediately applied upon > > thread launch. This does not affect kernel threads that specify cpu > > and node. > > > > This allows CPU isolation (that is not allowing certain threads > > to execute on certain CPUs) without using the isolcpus=domain parameter, > > making it possible to enable load balancing on such CPUs > > during runtime > ... > > How about making it possible to change the default affinity > for new kthreads at run time? > Is it possible to change the affinity of existing threads? > Or maybe only those that didn't specify an explicit one?? > > David > > - > Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK > Registration No: 1397386 (Wales) Hi David, Problem with that approach is the window between kernel thread creation and cpumask change.