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 X-Spam-Level: X-Spam-Status: No, score=-3.9 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id D2D73C43331 for ; Sat, 28 Mar 2020 15:27:58 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 8CD9520716 for ; Sat, 28 Mar 2020 15:27:58 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="eQSQxA/V" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726977AbgC1P15 (ORCPT ); Sat, 28 Mar 2020 11:27:57 -0400 Received: from us-smtp-delivery-74.mimecast.com ([63.128.21.74]:58132 "EHLO us-smtp-delivery-74.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725807AbgC1P15 (ORCPT ); Sat, 28 Mar 2020 11:27:57 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1585409276; 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: references:references; bh=p7VGwf4cuRJgF3sKdibEsjbhU2tO6rj8LiLsxk+nJEk=; b=eQSQxA/VlZ2gRL91n9LdFFO/Fi71nJEnkf0EUSpBRI+s6I/mkGL2z18o1bxcI6maPKS/1F oSUZVZPgyd2SMTvZFNiea9feyfYE2vkz7/9RWGpPJu6TTvhG19z43RIjGAHET+chz8/x6H EBDGDqxIejJrKxPgUiA5iO+xQc7uBUY= 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-434-VXYC5tg8NOmTXZ_yh8allQ-1; Sat, 28 Mar 2020 11:27:54 -0400 X-MC-Unique: VXYC5tg8NOmTXZ_yh8allQ-1 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 853BF100551A; Sat, 28 Mar 2020 15:27:52 +0000 (UTC) Received: from fuller.cnet (ovpn-116-11.gru2.redhat.com [10.97.116.11]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 1A552CDBE1; Sat, 28 Mar 2020 15:27:52 +0000 (UTC) Received: by fuller.cnet (Postfix, from userid 1000) id 4EA534198B36; Sat, 28 Mar 2020 12:27:27 -0300 (-03) Message-ID: <20200328152503.187340671@redhat.com> User-Agent: quilt/0.66 Date: Sat, 28 Mar 2020 12:21:18 -0300 From: Marcelo Tosatti To: linux-kernel@vger.kernel.org Cc: Frederic Weisbecker , Chris Friesen , Thomas Gleixner , Peter Zijlstra , Andrew Morton , Jim Somerville , Christoph Lameter , Frederic Weisbecker , Marcelo Tosatti Subject: [patch 1/3] kthread: switch to cpu_possible_mask References: <20200328152117.881555226@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Next patch will switch unbound kernel threads mask to housekeeping_cpumask(), a subset of cpu_possible_mask. Switch from cpu_all_mask to cpu_possible_mask separately, to ease bisection. Suggested-by: Frederic Weisbecker Signed-off-by: Marcelo Tosatti --- kernel/kthread.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) Index: linux-2.6/kernel/kthread.c =================================================================== --- linux-2.6.orig/kernel/kthread.c +++ linux-2.6/kernel/kthread.c @@ -347,7 +347,7 @@ struct task_struct *__kthread_create_on_ * The kernel thread should not inherit these properties. */ sched_setscheduler_nocheck(task, SCHED_NORMAL, ¶m); - set_cpus_allowed_ptr(task, cpu_all_mask); + set_cpus_allowed_ptr(task, cpu_possible_mask); } kfree(create); return task; @@ -572,7 +572,7 @@ int kthreadd(void *unused) /* Setup a clean context for our children to inherit. */ set_task_comm(tsk, "kthreadd"); ignore_signals(tsk); - set_cpus_allowed_ptr(tsk, cpu_all_mask); + set_cpus_allowed_ptr(tsk, cpu_possible_mask); set_mems_allowed(node_states[N_MEMORY]); current->flags |= PF_NOFREEZE;