From: Vineet Gupta <Vineet.Gupta1@synopsys.com>
To: Ingo Molnar <mingo@redhat.com>,
Peter Zijlstra <peterz@infradead.org>,
Andrew Morton <akpm@linux-foundation.org>
Cc: linux-arch@vger.kernel.org
Subject: [RFC PATCH REBASED 0/3] Move ARCH specific fpu_counter out of task_struct
Date: Tue, 17 Sep 2013 11:47:16 +0530 [thread overview]
Message-ID: <1379398639-27403-1-git-send-email-vgupta@synopsys.com> (raw)
Hi,
This is a resend of the patches I sent last week which failed to draw any
attention.
This basically came up when ARC SMP 3.11 failed to build due to a ST insn
dealing with task_struct.thread going out of range.
When staring at code I spotted @fpu_counter in task_struct which only SH/x86
happen to use, and can be easily moved out into corresponding ARCH specific
thread_struct. This saves 4 bytes per task_struct instantiated, for all the
other 18 arches.
One of the resistance to the patch(es) could be that task_struct fields were at
some point arranged to reduce the number of line misses. However there is lot
of variance there due to so many #ifdefs, variable size of cpumask (>32 cores..)
etc, so that argument alone might not be sufficient vs. saving 4 bytes per
instance.
Comments please !
Thx,
-Vineet
Vineet Gupta (3):
sh: Move fpu_counter into ARCH specific thread_struct
x86: Move fpu_counter into ARCH specific thread_struct
sched: Remove ARCH specific fpu_counter from task_struct
arch/sh/include/asm/fpu.h | 2 +-
arch/sh/include/asm/processor_32.h | 10 ++++++++++
arch/sh/include/asm/processor_64.h | 10 ++++++++++
arch/sh/kernel/cpu/fpu.c | 2 +-
arch/sh/kernel/process_32.c | 6 +++---
arch/x86/include/asm/fpu-internal.h | 10 +++++-----
arch/x86/include/asm/processor.h | 9 +++++++++
arch/x86/kernel/i387.c | 2 +-
arch/x86/kernel/process_32.c | 4 ++--
arch/x86/kernel/process_64.c | 2 +-
arch/x86/kernel/traps.c | 2 +-
include/linux/sched.h | 9 ---------
12 files changed, 44 insertions(+), 24 deletions(-)
--
1.8.1.2
next reply other threads:[~2013-09-17 6:17 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-09-17 6:17 Vineet Gupta [this message]
2013-09-17 6:17 ` [RFC PATCH REBASED 1/3] sh: Move fpu_counter into ARCH specific thread_struct Vineet Gupta
2013-09-17 8:00 ` Peter Zijlstra
2013-09-17 8:14 ` Vineet Gupta
2013-09-17 8:25 ` Peter Zijlstra
2013-09-17 8:25 ` Peter Zijlstra
2013-10-01 10:33 ` Vineet Gupta
2013-10-01 10:33 ` Vineet Gupta
2013-09-17 6:17 ` [RFC PATCH REBASED 2/3] x86: " Vineet Gupta
2013-09-17 10:34 ` Vineet Gupta
2013-09-23 6:58 ` Vineet Gupta
2013-09-18 18:12 ` Paul Gortmaker
2013-09-18 18:15 ` Paul Gortmaker
2013-09-23 8:33 ` Ingo Molnar
2013-10-04 11:24 ` Vineet Gupta
2013-09-17 6:17 ` [RFC PATCH REBASED 3/3] sched: Remove ARCH specific fpu_counter from task_struct Vineet Gupta
2013-09-17 6:17 ` Vineet Gupta
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1379398639-27403-1-git-send-email-vgupta@synopsys.com \
--to=vineet.gupta1@synopsys.com \
--cc=akpm@linux-foundation.org \
--cc=linux-arch@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=peterz@infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).