From: "Michal Suchánek" <msuchanek@suse.de>
To: Michael Ellerman <mpe@ellerman.id.au>
Cc: Mauricio Faria de Oliveira <mauricfo@linux.vnet.ibm.com>,
linuxppc-dev@lists.ozlabs.org
Subject: Re: [PATCH 2/3] rfi-flush: Make it possible to call setup_rfi_flush() again
Date: Tue, 6 Mar 2018 13:55:22 +0100 [thread overview]
Message-ID: <20180306135522.040707de@kitsune.suse.cz> (raw)
In-Reply-To: <876069flhq.fsf@concordia.ellerman.id.au>
On Tue, 06 Mar 2018 23:15:45 +1100
Michael Ellerman <mpe@ellerman.id.au> wrote:
> Mauricio Faria de Oliveira <mauricfo@linux.vnet.ibm.com> writes:
>=20
> > Hi Michael, Michal,
> >
> > I got back from vacation. Checking this one. =20
>=20
> Yeah it got stuck in a rut.
>=20
> > On 02/20/2018 02:06 PM, Michal Such=C3=A1nek wrote: =20
> >>> I did it the way I did because otherwise we waste memory on every
> >>> system on earth just to support a use case that we don't actually
> >>> intend for anyone to ever use - ie. migrating from a patched
> >>> machine to an unpatched machine. =20
> >
> > If this thread eventually closes in 'ok, so that memory has to be
> > reserved/wasted anyway', that can be done only in pseries, right?
> >
> > It seems not so much memory for this particular platform/hardware. =20
>=20
> Yes and no. We certainly have pseries machines with 10s of TBs of
> memory, but pseries is also used when running on KVM/Openstack where
> some people are interested in running small VMs - so as usual it's not
> so simple :)
>=20
> But it's not *that* much memory so we should probably stop worrying
> about it and just always allocate the fallback on pseries.
>=20
> I *think* the patch below is all we need, as well as some tweaking of
> patch 2, are you able to test and repost?
>=20
> cheers
>=20
> diff --git a/arch/powerpc/platforms/pseries/setup.c
> b/arch/powerpc/platforms/pseries/setup.c index
> 1a527625acf7..9116824bd7c5 100644 ---
> a/arch/powerpc/platforms/pseries/setup.c +++
> b/arch/powerpc/platforms/pseries/setup.c @@ -468,26 +468,18 @@ static
> void pseries_setup_rfi_flush(void)=20
> /* Enable by default */
> enable =3D true;
> + types =3D L1D_FLUSH_FALLBACK;
> =20
> rc =3D plpar_get_cpu_characteristics(&result);
> if (rc =3D=3D H_SUCCESS) {
> - types =3D L1D_FLUSH_NONE;
> -
> if (result.character & H_CPU_CHAR_L1D_FLUSH_TRIG2)
> types |=3D L1D_FLUSH_MTTRIG;
> if (result.character & H_CPU_CHAR_L1D_FLUSH_ORI30)
> types |=3D L1D_FLUSH_ORI;
> =20
> - /* Use fallback if nothing set in hcall */
> - if (types =3D=3D L1D_FLUSH_NONE)
> - types =3D L1D_FLUSH_FALLBACK;
> -
> if ((!(result.behaviour & H_CPU_BEHAV_L1D_FLUSH_PR))
> || (!(result.behaviour & H_CPU_BEHAV_FAVOUR_SECURITY)))
> enable =3D false;
> - } else {
> - /* Default to fallback if case hcall is not
> available */
> - types =3D L1D_FLUSH_FALLBACK;
> }
> =20
> setup_rfi_flush(types, enable);
>=20
Enabling the fallback flush always looks a bit dodgy but
do_rfi_flush_fixups will overwrite the jump so long any other fixup is
enabled.
Reviewed-by: Michal Such=C3=A1nek <msuchanek@suse.de>
Thanks
Michal
next prev parent reply other threads:[~2018-03-06 12:55 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-02-14 21:33 [PATCH 0/3] Setup RFI flush after PowerVM LPM migration Mauricio Faria de Oliveira
2018-02-14 21:33 ` [PATCH 1/3] rfi-flush: Move the logic to avoid a redo into the debugfs code Mauricio Faria de Oliveira
2018-02-14 21:33 ` [PATCH 2/3] rfi-flush: Make it possible to call setup_rfi_flush() again Mauricio Faria de Oliveira
2018-02-15 7:13 ` Michal Suchánek
2018-02-16 11:50 ` Mauricio Faria de Oliveira
2018-02-20 9:59 ` Michael Ellerman
2018-02-20 17:06 ` Michal Suchánek
2018-03-05 22:46 ` Mauricio Faria de Oliveira
2018-03-06 10:21 ` Michal Suchánek
2018-03-06 12:15 ` Michael Ellerman
2018-03-06 12:55 ` Michal Suchánek [this message]
2018-03-12 23:08 ` Mauricio Faria de Oliveira
2018-03-13 11:39 ` Michael Ellerman
2018-03-13 12:14 ` Mauricio Faria de Oliveira
2018-03-13 17:59 ` Michal Suchánek
2018-03-13 18:13 ` Mauricio Faria de Oliveira
2018-03-13 18:36 ` Michal Suchánek
2018-03-13 20:18 ` Mauricio Faria de Oliveira
2018-03-16 14:18 ` Michael Ellerman
2018-03-16 16:51 ` Mauricio Faria de Oliveira
2018-02-14 21:33 ` [PATCH 3/3] rfi-flush: Call setup_rfi_flush() after LPM migration Mauricio Faria de Oliveira
2018-02-14 21:39 ` [PATCH] DEBUG: shortcut mobility fixup/migration store, and abuse no_rfi_flush Mauricio Faria de Oliveira
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=20180306135522.040707de@kitsune.suse.cz \
--to=msuchanek@suse.de \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=mauricfo@linux.vnet.ibm.com \
--cc=mpe@ellerman.id.au \
/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).