Received: by 2002:a05:6a10:6d10:0:0:0:0 with SMTP id gq16csp3161989pxb; Mon, 18 Apr 2022 17:43:19 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzd93RGyLHci/BcDTik4Fa0y2hNc8v8IHtTmoRZuGns/tIjfU9s4UjHB52nGiGV1Vgjfz/g X-Received: by 2002:a17:903:2149:b0:158:9d1f:ce6c with SMTP id s9-20020a170903214900b001589d1fce6cmr13071619ple.30.1650328999234; Mon, 18 Apr 2022 17:43:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1650328999; cv=none; d=google.com; s=arc-20160816; b=Tu1wEWg3PuOtydUonCK4C/t7GTIijIEyQOAadRYe2QKARbRsKZftVJO1x+SNaKzG3P pXot+HYtbeAVoFPFVYZ/+MqJPIMczRxRqONrdyQZCFSaefeGBvaymVnrB2W7UG4HWZjI PWu6cPzWh2slamm+/S8L4JfaQqmW7Rb8IcvEOvqgBvHBuDZ3lc8vXtjeRVeFvF4LG683 q7e+2pQI5QAcey/cUXRegO7KpVKyxL9TEks2h807QH08zNZ9EOdOeotTY35sZoDvD6JJ MjMQ8sNSMn0aDppjQ3cnRfIOWGLILV+xYSBm4R5vGphm9ZbJ0WwTZ6GsI6brg7fZWamc Jn1A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=ZeQECvx9YlX1g3mZam4e1g/sQpuFMAjoUEWX/K4dhNg=; b=Yc5MOrqh1v/5uDZ+dDJwB9127zZkkGbwEmv7c+cZ+umkSvtNzoBX9SHEVlebL7uKW+ UcFSifBdE3L9Xj9kYfzP611zArlGlkDYpbo2v/fn2SrgicSY4v/IocNlJ2Xp2tX217Pu lMZRkqam56qyR8LnxLGphqvjz3vZ3oK/X4mKc6Ajcgyy/HoUgPSrNH/DwPO9TIZWqaX/ MA5DAl/gcik8gwsVcOVKGfTtm7dSnzzTof3WfVKzhGryyDi7FOk8F+E2xDBzRnAXw7dc GSmhQT964Srjs8PdZnaf+NXvFzpEWaDl3YBezwQ/k/2+7PT6AN/YVgiopUbRysg1568Z OTCA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b="iHw/ui3b"; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id y186-20020a638ac3000000b003a2e4a3b2d3si10172648pgd.163.2022.04.18.17.43.03; Mon, 18 Apr 2022 17:43:19 -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=@linuxfoundation.org header.s=korg header.b="iHw/ui3b"; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233556AbiDRNjM (ORCPT + 99 others); Mon, 18 Apr 2022 09:39:12 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53246 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240920AbiDRNK4 (ORCPT ); Mon, 18 Apr 2022 09:10:56 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 24AF63982F; Mon, 18 Apr 2022 05:50:31 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 80D236124D; Mon, 18 Apr 2022 12:50:31 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 7090BC385A7; Mon, 18 Apr 2022 12:50:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1650286230; bh=Apzs0Kbg3O1yu1X8bywMUmaib7PZAYfI8Xg4iJER7UA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=iHw/ui3b2YGrDgBZGO8VW21SKHhHgFjgVBqpVTfeGflRYk2d07NkpTN3PqFsF9P2h 8/sYoghzZObUwGTJ4RIj917uykmTeRK0kZTAqigWrVtLCsEips74VfPFwl8EmPyU8U rRkTBWZvwJiWMuScEwDATQrcOnyrO0l5fhGxHt2s= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Bharata B Rao , "Peter Zijlstra (Intel)" , Srikar Dronamraju , Mel Gorman , Sasha Levin Subject: [PATCH 4.14 068/284] sched/debug: Remove mpol_get/put and task_lock/unlock from sched_show_numa Date: Mon, 18 Apr 2022 14:10:49 +0200 Message-Id: <20220418121212.623312922@linuxfoundation.org> X-Mailer: git-send-email 2.35.3 In-Reply-To: <20220418121210.689577360@linuxfoundation.org> References: <20220418121210.689577360@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.7 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE 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 From: Bharata B Rao [ Upstream commit 28c988c3ec29db74a1dda631b18785958d57df4f ] The older format of /proc/pid/sched printed home node info which required the mempolicy and task lock around mpol_get(). However the format has changed since then and there is no need for sched_show_numa() any more to have mempolicy argument, asssociated mpol_get/put and task_lock/unlock. Remove them. Fixes: 397f2378f1361 ("sched/numa: Fix numa balancing stats in /proc/pid/sched") Signed-off-by: Bharata B Rao Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Srikar Dronamraju Acked-by: Mel Gorman Link: https://lore.kernel.org/r/20220118050515.2973-1-bharata@amd.com Signed-off-by: Sasha Levin --- kernel/sched/debug.c | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/kernel/sched/debug.c b/kernel/sched/debug.c index 187c04a34ba1..053c480f5382 100644 --- a/kernel/sched/debug.c +++ b/kernel/sched/debug.c @@ -899,25 +899,15 @@ void print_numa_stats(struct seq_file *m, int node, unsigned long tsf, static void sched_show_numa(struct task_struct *p, struct seq_file *m) { #ifdef CONFIG_NUMA_BALANCING - struct mempolicy *pol; - if (p->mm) P(mm->numa_scan_seq); - task_lock(p); - pol = p->mempolicy; - if (pol && !(pol->flags & MPOL_F_MORON)) - pol = NULL; - mpol_get(pol); - task_unlock(p); - P(numa_pages_migrated); P(numa_preferred_nid); P(total_numa_faults); SEQ_printf(m, "current_node=%d, numa_group_id=%d\n", task_node(p), task_numa_group_id(p)); show_numa_stats(p, m); - mpol_put(pol); #endif } -- 2.34.1