From patchwork Thu Jan 20 02:10:09 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrew Morton X-Patchwork-Id: 12718216 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 kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id B3403C433F5 for ; Thu, 20 Jan 2022 02:10:13 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 523416B00CF; Wed, 19 Jan 2022 21:10:13 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 4D2766B00D0; Wed, 19 Jan 2022 21:10:13 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 3C16D6B00D1; Wed, 19 Jan 2022 21:10:13 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (relay025.a.hostedemail.com [64.99.140.25]) by kanga.kvack.org (Postfix) with ESMTP id 2D7F46B00CF for ; Wed, 19 Jan 2022 21:10:13 -0500 (EST) Received: from smtpin02.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay11.hostedemail.com (Postfix) with ESMTP id D2B3780382 for ; Thu, 20 Jan 2022 02:10:12 +0000 (UTC) X-FDA: 79049035464.02.519A29C Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by imf16.hostedemail.com (Postfix) with ESMTP id 62D9C18000F for ; Thu, 20 Jan 2022 02:10:12 +0000 (UTC) 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 55140B81911; Thu, 20 Jan 2022 02:10:11 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id B5C85C004E1; Thu, 20 Jan 2022 02:10:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linux-foundation.org; s=korg; t=1642644610; bh=fhYZ5de3U+PmZP5EiRTk5VD9Td7x2tkElhDTWFsWF14=; h=Date:From:To:Subject:In-Reply-To:From; b=kwTS3PTCgN72sZRw0X3XgshJxESGW5ID1CPDYbFnEECAbjPEZrvm0SrDmrgyrXjOi 7XcdtsGvuztEWZULQ7eRhQ3OyxyF+1rGo/Vdm8E4eELHfzG7t6Gsgtx3XGMxdfG3wP D/AUPLZMa3PlGNg0wzySZP7c1QY+kzFKPI0D4bQs= Date: Wed, 19 Jan 2022 18:10:09 -0800 From: Andrew Morton To: akpm@linux-foundation.org, bsingharora@gmail.com, hannes@cmpxchg.org, linux-mm@kvack.org, mingo@kernel.org, mm-commits@vger.kernel.org, peterz@infradead.org, torvalds@linux-foundation.org, yang.yang29@zte.com.cn, zealci@zte.com.cn Subject: [patch 46/55] delayacct: cleanup flags in struct task_delay_info and functions use it Message-ID: <20220120021009.7aaRcJt-h%akpm@linux-foundation.org> In-Reply-To: <20220119180714.9e187ce100e4510de3cd9f7d@linux-foundation.org> User-Agent: s-nail v14.8.16 X-Rspamd-Queue-Id: 62D9C18000F X-Stat-Signature: nszbf5u1w68wbanngeq8bdfqc45pectr Authentication-Results: imf16.hostedemail.com; dkim=pass header.d=linux-foundation.org header.s=korg header.b=kwTS3PTC; dmarc=none; spf=pass (imf16.hostedemail.com: domain of akpm@linux-foundation.org designates 145.40.68.75 as permitted sender) smtp.mailfrom=akpm@linux-foundation.org X-Rspamd-Server: rspam08 X-HE-Tag: 1642644612-15498 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: From: Yang Yang Subject: delayacct: cleanup flags in struct task_delay_info and functions use it Flags in struct task_delay_info is used to distinguish the difference between swapin and blkio delay acountings. But after patch "delayacct: support swapin delay accounting for swapping without blkio", there is no need to do that since swapin and blkio delay accounting use their own functions. Link: https://lkml.kernel.org/r/20211124065958.36703-1-yang.yang29@zte.com.cn Signed-off-by: Yang Yang Cc: Balbir Singh Cc: Ingo Molnar Cc: Johannes Weiner Cc: Peter Zijlstra Cc: Zeal Robot Signed-off-by: Andrew Morton --- include/linux/delayacct.h | 17 ----------------- 1 file changed, 17 deletions(-) --- a/include/linux/delayacct.h~delayacct-cleanup-flags-in-struct-task_delay_info-and-functions-use-it +++ a/include/linux/delayacct.h @@ -12,7 +12,6 @@ #ifdef CONFIG_TASK_DELAY_ACCT struct task_delay_info { raw_spinlock_t lock; - unsigned int flags; /* Private per-task flags */ /* For each stat XXX, add following, aligned appropriately * @@ -74,18 +73,6 @@ extern void __delayacct_thrashing_end(vo extern void __delayacct_swapin_start(void); extern void __delayacct_swapin_end(void); -static inline void delayacct_set_flag(struct task_struct *p, int flag) -{ - if (p->delays) - p->delays->flags |= flag; -} - -static inline void delayacct_clear_flag(struct task_struct *p, int flag) -{ - if (p->delays) - p->delays->flags &= ~flag; -} - static inline void delayacct_tsk_init(struct task_struct *tsk) { /* reinitialize in case parent's non-null pointer was dup'ed*/ @@ -184,10 +171,6 @@ static inline void delayacct_swapin_end( } #else -static inline void delayacct_set_flag(struct task_struct *p, int flag) -{} -static inline void delayacct_clear_flag(struct task_struct *p, int flag) -{} static inline void delayacct_init(void) {} static inline void delayacct_tsk_init(struct task_struct *tsk)