From patchwork Tue Apr 5 07:19:33 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg Kroah-Hartman X-Patchwork-Id: 557648 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 68952C4167B for ; Tue, 5 Apr 2022 09:13:26 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1343783AbiDEJMy (ORCPT ); Tue, 5 Apr 2022 05:12:54 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47606 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S244866AbiDEIwo (ORCPT ); Tue, 5 Apr 2022 04:52:44 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A318423BC3; Tue, 5 Apr 2022 01:45:06 -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 ams.source.kernel.org (Postfix) with ESMTPS id 5883DB81B18; Tue, 5 Apr 2022 08:45:05 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id A1949C385A1; Tue, 5 Apr 2022 08:45:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1649148304; bh=qDb2yczGtwpz0AJpIT9C2+a0YZXdqcJhVPbGZVx1LD8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=0fAJs5GGCUDMMgvSHp4L/s7LMBRzj12DWnUxHKkUHjVfsu7DFkIgZQGRQm5RhD1Gt jRIdZ0tvmI/AHSOPUJrFq/4Z8qGFqlAZUtVTvJ3YD/XU7URXuEUR3utWX7ILwgMrsl 6ZxEv3ZoDnbSMYM0+Rlv0bjbkA8A7+rYVsB1Wq7k= 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 5.16 0260/1017] sched/debug: Remove mpol_get/put and task_lock/unlock from sched_show_numa Date: Tue, 5 Apr 2022 09:19:33 +0200 Message-Id: <20220405070401.981090173@linuxfoundation.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220405070354.155796697@linuxfoundation.org> References: <20220405070354.155796697@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: stable@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 7dcbaa31c5d9..50e05c8d0d61 100644 --- a/kernel/sched/debug.c +++ b/kernel/sched/debug.c @@ -931,25 +931,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 }