From: Borislav Petkov <bp@alien8.de>
To: Kristen Carlson Accardi <kristen@linux.intel.com>
Cc: linux-sgx@vger.kernel.org, Jonathan Corbet <corbet@lwn.net>,
Jarkko Sakkinen <jarkko@kernel.org>,
Dave Hansen <dave.hansen@linux.intel.com>,
Thomas Gleixner <tglx@linutronix.de>,
Ingo Molnar <mingo@redhat.com>,
x86@kernel.org, "H. Peter Anvin" <hpa@zytor.com>,
lkml <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 1/2] x86/sgx: Add accounting for tracking overcommit
Date: Mon, 20 Dec 2021 23:48:20 +0100 [thread overview]
Message-ID: <YcEINHL3LViw11Yv@zn.tnic> (raw)
In-Reply-To: <f9faa3ee2614af088c510bc3c68080712665cd8f.camel@linux.intel.com>
On Mon, Dec 20, 2021 at 01:35:03PM -0800, Kristen Carlson Accardi wrote:
> So, in your proposal you would first change the calculated number of
> maximum available backing pages to be based on total system RAM rather
> than EPC memory, got it.
This was just an example. My point is to try to make it automatic and
not introduce another knob. And to decide on the limits and behavior
by using common sense and addressing the common use cases first.
> This would require recalculating the max number of allowed backing
> pages per enclave at run time whenever a new enclave is loaded - but
> all the existing enclaves may have already used more than the new max
> number of per-enclave allowable pages. How would you handle that
> scenario? This would add a lot of complexity for sure - and it does
> make me wonder whether any additional benefit of limiting per enclave
> would be worth it.
See above - this was just an example. And as you've shown, an example of
what *not* to do.
> Thanks for your more detailed explanation - I will take a look at the
> VM overcommit limits. Since obviously the original implementation did
> have a default value set, I had still a remaining specific question
> about your comments. Are you suggesting that there should not be a way
> to override any overcommit limit at all? So drop the parameter all
> together?
So let me ask you a counter-question:
Imagine you're a sysadmin. Or a general, common system user if there
ever is one.
When your system starts thrashing and you're running a bunch of
enclaves, how do you find out there even is a knob which might
potentially help you?
And after you find it, how would you use that knob?
Or would you rather prefer that the system did the right thing for you
instead of having to figure out what the sensible values for that knob
would be?
My point is: put yourself in the user's shoes and try to think about
what would be the optimal thing the system should do.
Once that is cleanly and properly defined, then we can deal with knobs
and policies etc.
I sincerely hope that makes more sense.
--
Regards/Gruss,
Boris.
https://people.kernel.org/tglx/notes-about-netiquette
next prev parent reply other threads:[~2021-12-20 22:48 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-12-20 17:46 [PATCH 0/2] x86/sgx: Limit EPC overcommit Kristen Carlson Accardi
2021-12-20 17:46 ` [PATCH 1/2] x86/sgx: Add accounting for tracking overcommit Kristen Carlson Accardi
2021-12-20 19:30 ` Borislav Petkov
2021-12-20 20:39 ` Kristen Carlson Accardi
2021-12-20 21:11 ` Borislav Petkov
2021-12-20 21:35 ` Kristen Carlson Accardi
2021-12-20 22:48 ` Borislav Petkov [this message]
2021-12-21 15:53 ` Dave Hansen
2021-12-22 14:21 ` Dave Hansen
2021-12-28 23:04 ` Jarkko Sakkinen
2021-12-28 23:34 ` Dave Hansen
2022-01-06 18:26 ` Kristen Carlson Accardi
2022-01-07 12:25 ` Jarkko Sakkinen
2022-01-07 17:17 ` Kristen Carlson Accardi
2022-01-08 15:54 ` Jarkko Sakkinen
2021-12-20 17:46 ` [PATCH 2/2] x86/sgx: account backing pages Kristen Carlson Accardi
2021-12-28 23:37 ` Jarkko Sakkinen
2022-01-05 0:36 ` Dave Hansen
2022-01-08 14:24 ` Jarkko Sakkinen
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=YcEINHL3LViw11Yv@zn.tnic \
--to=bp@alien8.de \
--cc=corbet@lwn.net \
--cc=dave.hansen@linux.intel.com \
--cc=hpa@zytor.com \
--cc=jarkko@kernel.org \
--cc=kristen@linux.intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-sgx@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=tglx@linutronix.de \
--cc=x86@kernel.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