From: Heiko Carstens <hca@linux.ibm.com>
To: Steffen Eiden <seiden@linux.ibm.com>
Cc: Alexander Gordeev <agordeev@linux.ibm.com>,
Christian Borntraeger <borntraeger@linux.ibm.com>,
Janosch Frank <frankja@linux.ibm.com>,
Claudio Imbrenda <imbrenda@linux.ibm.com>,
Vasily Gorbik <gor@linux.ibm.com>,
linux-s390@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-mm@kvack.org, nrb@linux.ibm.com
Subject: Re: [PATCH 1/3] s390/cpufeature: rework to allow more than only hwcap bits
Date: Thu, 14 Jul 2022 12:52:25 +0200 [thread overview]
Message-ID: <Ys/1ab1BXPw1RWuy@osiris> (raw)
In-Reply-To: <4132ba2a-f5ad-25ba-7f74-72369b8a140b@linux.ibm.com>
> > > +static struct s390_cpu_feature s390_cpu_features[MAX_CPU_FEATURES] = {
> > > + [S390_CPU_FEATURE_ESAN3] = {.type = TYPE_HWCAP, .num = HWCAP_NR_ESAN3},
> > > + [S390_CPU_FEATURE_ZARCH] = {.type = TYPE_HWCAP, .num = HWCAP_NR_ZARCH},
...
> > I only realized now that you added all HWCAP bits here. It was
> > intentional that I added only the two bits which are currently used
> > for several reasons:
> >
> > - Keep the array as small as possible.
> > - No need to keep this array in sync with HWCAPs, if new ones are added.
> > - There is a for loop in print_cpu_modalias() which iterates over all
> > MAX_CPU_FEATURES entries; this should be as fast as possible. Adding
> > extra entries burns cycles for no added value.
> The loop in print_cpu_modalias() was the reason why I added all
> current HWCAPs. The current implementation runs through all HWCAPs
> using cpu_have_feature() and I feared that reducing to just MSA and
> VXRS has effects in the reporting of CPU-features to userspace.
>
> I double checked the output of 'grep features /proc/cpuinfo' and it
> stays the same, for 5.19-rc6, 5.19-rc6+this series, 5.19-rc6+this series
> with just the two S390_CPU_FEATUREs. I might have misunderstood what happens
> in that loop in print_cpu_modalias().
It is used on cpu hotplug to generate a MODALIAS environment
variable. You can check that by running "udevadm monitor -p"
and then switching a cpu off/on.
This environment variable is then used by systemd/udev to load
feature matching modules via kmod.
next prev parent reply other threads:[~2022-07-14 10:52 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-07-12 10:52 [PATCH 0/3] s390/cpufeature: rework to allow different types of cpufeatures Steffen Eiden
2022-07-12 10:52 ` [PATCH 1/3] s390/cpufeature: rework to allow more than only hwcap bits Steffen Eiden
2022-07-12 11:56 ` Steffen Eiden
2022-07-12 16:46 ` Claudio Imbrenda
2022-07-12 19:27 ` Heiko Carstens
2022-07-12 19:25 ` Heiko Carstens
2022-07-13 8:32 ` Steffen Eiden
2022-07-14 10:52 ` Heiko Carstens [this message]
2022-07-15 8:03 ` Hendrik Brueckner
2022-07-12 10:52 ` [PATCH 2/3] s390/cpufeature: allow for facility bits Steffen Eiden
2022-07-12 16:50 ` Claudio Imbrenda
2022-07-12 10:52 ` [PATCH 3/3] s390/uvdevice: autoload module based on CPU facility Steffen Eiden
2022-07-12 16:49 ` Claudio Imbrenda
2022-07-13 8:39 ` Steffen Eiden
2022-07-13 9:16 ` Claudio Imbrenda
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=Ys/1ab1BXPw1RWuy@osiris \
--to=hca@linux.ibm.com \
--cc=agordeev@linux.ibm.com \
--cc=borntraeger@linux.ibm.com \
--cc=frankja@linux.ibm.com \
--cc=gor@linux.ibm.com \
--cc=imbrenda@linux.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=linux-s390@vger.kernel.org \
--cc=nrb@linux.ibm.com \
--cc=seiden@linux.ibm.com \
/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