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 Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id DF51EC2BD09 for ; Fri, 28 Jun 2024 19:35:50 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 605186B0089; Fri, 28 Jun 2024 15:35:50 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 5B51D6B008C; Fri, 28 Jun 2024 15:35:50 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 47C786B0092; Fri, 28 Jun 2024 15:35:50 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0017.hostedemail.com [216.40.44.17]) by kanga.kvack.org (Postfix) with ESMTP id 29B8D6B0089 for ; Fri, 28 Jun 2024 15:35:50 -0400 (EDT) Received: from smtpin01.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay02.hostedemail.com (Postfix) with ESMTP id DB81C12072E for ; Fri, 28 Jun 2024 19:35:49 +0000 (UTC) X-FDA: 82281302418.01.3028170 Received: from out-178.mta1.migadu.com (out-178.mta1.migadu.com [95.215.58.178]) by imf20.hostedemail.com (Postfix) with ESMTP id 2F34F1C000D for ; Fri, 28 Jun 2024 19:35:45 +0000 (UTC) Authentication-Results: imf20.hostedemail.com; dkim=pass header.d=linux.dev header.s=key1 header.b=kFn3ZUre; spf=pass (imf20.hostedemail.com: domain of kent.overstreet@linux.dev designates 95.215.58.178 as permitted sender) smtp.mailfrom=kent.overstreet@linux.dev; dmarc=pass (policy=none) header.from=linux.dev ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1719603327; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=xaGqWDBJ6GaiK4mpnK9Yegq3eWxMBsICuV+fDIkcKjU=; b=NRmDM2LDhixVgG4KQpgosbRpFo5UcTh6vzT1ZMPy0tYKNW2npWBXvGWPJkmeRNDVkbV1m7 veDzjV9Tz4aIYVJn2ugelDeSqzN/U7JCFjqyza7ATA87rEx7cqAc3glovQraNHeN9Oa44t nLIH5mBCllSxoVwV2VjpenDhmZ+tILM= ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1719603327; a=rsa-sha256; cv=none; b=IHZoxZJIYRcLxBwZcp2wKI+I8lzQK9dPruOXkDL+hmz0Yb+wfIZBZx9gQRN5fFmPraA1uf E0Ay5Awf+N9CNHLhivVZqDJvpcoi7+9Xr8TFH8nPTKZZbG9pZ1smV83uBFHHixETvnPs73 D0Gx1oz2SAklKuJqChjcuSlfZuYe4ik= ARC-Authentication-Results: i=1; imf20.hostedemail.com; dkim=pass header.d=linux.dev header.s=key1 header.b=kFn3ZUre; spf=pass (imf20.hostedemail.com: domain of kent.overstreet@linux.dev designates 95.215.58.178 as permitted sender) smtp.mailfrom=kent.overstreet@linux.dev; dmarc=pass (policy=none) header.from=linux.dev X-Envelope-To: bigeasy@linutronix.de DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1719603343; 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=xaGqWDBJ6GaiK4mpnK9Yegq3eWxMBsICuV+fDIkcKjU=; b=kFn3ZUree0Bwv9e9iBCwDTxtbj71GwhEYtYcYK14hlkJRPgRGAy36VrfVfgWmK8VyMWPZB 4ziHKyWzTYUBFyRQxZCAAEYw1iK5RUvvTmXSqM7SYflSzzIfMaGODnJYVJ8Vm1dJ5RA5UZ kyAPSnzwFOo2UuUJbbJdpGYX5aIcX64= X-Envelope-To: linux-mm@kvack.org X-Envelope-To: linux-kernel@vger.kernel.org X-Envelope-To: akpm@linux-foundation.org X-Envelope-To: bsegall@google.com X-Envelope-To: bristot@redhat.com X-Envelope-To: dietmar.eggemann@arm.com X-Envelope-To: mingo@redhat.com X-Envelope-To: juri.lelli@redhat.com X-Envelope-To: klarasmodin@gmail.com X-Envelope-To: mgorman@suse.de X-Envelope-To: peterz@infradead.org X-Envelope-To: rostedt@goodmis.org X-Envelope-To: surenb@google.com X-Envelope-To: tglx@linutronix.de X-Envelope-To: vschneid@redhat.com X-Envelope-To: vincent.guittot@linaro.org Date: Fri, 28 Jun 2024 15:35:38 -0400 X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Kent Overstreet To: Sebastian Andrzej Siewior Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org, Andrew Morton , Ben Segall , Daniel Bristot de Oliveira , Dietmar Eggemann , Ingo Molnar , Juri Lelli , Klara Modin , Mel Gorman , Peter Zijlstra , Steven Rostedt , Suren Baghdasaryan , Thomas Gleixner , Valentin Schneider , Vincent Guittot Subject: Re: [PATCH] sched/task_struct: Move alloc_tag to the end of the struct. Message-ID: References: <20240621102750.oH9p1FQq@linutronix.de> <20240628094944.QwcHkf8J@linutronix.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20240628094944.QwcHkf8J@linutronix.de> X-Migadu-Flow: FLOW_OUT X-Stat-Signature: fq9sxui7kfhcet8h4f45wg37jdm14qt7 X-Rspamd-Queue-Id: 2F34F1C000D X-Rspam-User: X-Rspamd-Server: rspam08 X-HE-Tag: 1719603345-898523 X-HE-Meta: U2FsdGVkX19YcrBVl7a/4xwBvscr3IHFX76c1UEaZayHNSjRpsoEKXMX8E5dDwOy+2ad0TMxD6dR50VJGqikyP8V+DbjLYsiZtPaCBO5IIzBy9cbf+8l+k6G9lDG22ko+1wQrWeOIXr5I8bGdcrbfKI1aKqnd3PqiZCfQyDuVfj54X/IOFeEXhvWC+XaBOucoVKUAndAQSx71HVItTqJpbwXQzzoTcbB0TqDbguByCPWEZyuQvo6dwrRJuGixepJHETzN53vlkkU8xK6+79MMRW/BCYAqBC9TK5AjDd2mWxUNcMFyYjyEadKxtK7wBGxcy1K0e1KAX0vpm11Z76Oqd3LHAcYNXjYi5zKQRzP9ORE2CKU8o9VJ2xhTpl4VqYMOXrUeL/WAHXI0hRnxiRLTyf46MW3+Mm5S9aYYfyRk6XB24seinCL/CXcVxLgzbxBNLGD1NOid7X8HYXlMEythk6QgAg0N809LmPweD2v74YLpxrsK3KpUwQUw3I9BDHeehgHxfPv95ToUwcwYu6hKJOtoduknGIh15Kqj0rhN7l0FwwAd/qY5I/+5YGXiIow1YBJ3GqZAx051nB0qG7dOaW2BCujmECQt8SQXOxEljPto+RGRXmJaw1kQuQQr3pcJc0jD1KabRCWoG74sGSHkCANd/a7JeVvWRpTSZKxW6LtVtQcl1p8mgLftV3zJKBArIDtqS0xxEIsijgJIADeAoiSHy+ClNfp5R108qtuW6nvDYR8f6QzbbN1zNqlyGUq85DVTljsdSQO8ElYK9pK+eYvszj416OcZJCZ1k/b67eA2BdFJ5iKaPIaj1N3l0qaY20D9P3MGpkRHaWruanstjXQ8xWVRxHpeVrF/fJLScE/1eF2Sn7GYVMmNd9thpnC+szzvCuTNK39niFyaYLkbK7TdxFQislCWl4vfIoiHrAENGcaKQ1hfhTLxjliouLQWYIyNSxjcps3nV7QVvL oipr64n7 LFoGM4/m+YVwSAe7pdRxbC58UzeodproNem6iECJHu+oXQKq5XiAWS5HNF8baOApFc+fedvkzJCVUSZl6atudMY9AWUsgIFWA2C7fDasg7c4PYcHOcps7FjZd5btRAE3qYZ7Sl840j+htc+ulo7BsrRtxFbO6r616BSLf7S3AR9ZK1GFcHikkqtAe+fiJLWCA2KsgCWPxnOR9cF3NdVU2chahnRrY3aOlEY23 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: List-Subscribe: List-Unsubscribe: On Fri, Jun 28, 2024 at 11:49:44AM +0200, Sebastian Andrzej Siewior wrote: > On 2024-06-21 12:27:52 [+0200], To linux-mm@kvack.org wrote: > > The alloc_tag member has been added to task_struct at the very > > beginning. This is a pointer and on 64bit architectures it forces 4 byte > > padding after `ptrace' and then forcing another another 4 byte padding > > after `on_cpu'. A few members later, `se' requires a cacheline aligned > > due to struct sched_avg resulting in 52 hole before `se'. > > > > This is the case on 64bit-SMP architectures. > > The 52 byte hole can be avoided by moving alloc_tag away where it > > currently resides. > > > > Move alloc_tag to the end of task_struct. There is likely a hole before > > `thread' due to its alignment requirement and the previous members are > > likely to be already pointer-aligned. > > > > Fixes: 22d407b164ff7 ("lib: add allocation tagging support for memory allocation profiling") > > Signed-off-by: Sebastian Andrzej Siewior > > Could we please get this merged and worry about possible performance > regression later? Or once there is a test case or an idea where this > pointer might fit better but clearly the current situation is worse. Sebastian, I gave you review feedback on your patch; if you can incorporate it into a new version your patch will sail right in.