From: Kristen Carlson Accardi <kristen@linux.intel.com>
To: Jarkko Sakkinen <jarkko@kernel.org>, Dave Hansen <dave.hansen@intel.com>
Cc: Ira Weiny <ira.weiny@intel.com>,
linux-kernel@vger.kernel.org, linux-sgx@vger.kernel.org,
Dave Hansen <dave.hansen@linux.intel.com>,
Thomas Gleixner <tglx@linutronix.de>,
Ingo Molnar <mingo@redhat.com>, Borislav Petkov <bp@alien8.de>,
x86@kernel.org, "H. Peter Anvin" <hpa@zytor.com>
Subject: Re: [PATCH] x86/sgx: Replace kmap/kunmap_atomic calls
Date: Thu, 13 Oct 2022 09:03:01 -0700 [thread overview]
Message-ID: <26cfc85cf1beebc600428e24f12f49c961540071.camel@linux.intel.com> (raw)
In-Reply-To: <Y0biN3/JsZMa0yUr@kernel.org>
On Wed, 2022-10-12 at 18:50 +0300, Jarkko Sakkinen wrote:
> On Wed, Oct 12, 2022 at 05:50:19PM +0300, Jarkko Sakkinen wrote:
> > On Wed, Oct 12, 2022 at 07:13:26AM -0700, Dave Hansen wrote:
> > > On 10/12/22 00:15, Jarkko Sakkinen wrote:
> > > > There's no data to show that this change would be useful to do.
> > >
> > > Jarkko, I think the overall transition to kmap_local_page() is a
> > > good
> > > one. It is a superior API and having it around will pave the way
> > > for
> > > new features. I don't think we should demand 'data' for each and
> > > every
> > > one of these.
> > >
> > > Please take a look around the tree and see how other maintainers
> > > are
> > > handling these patches. They're not limited to SGX.
> >
> > Sure, I'll take a look for comparison.
>
> Yeah, I think it is pretty solid idea.
>
> Looking at the decription:
>
> "It is not necessary to disable page faults or preemption when
> using kmap calls, so replace kmap_atomic() and kunmap_atomic()
> calls with more the more appropriate kmap_local_page() and
> kunmap_local() calls."
>
> We did not pick kmap_atomic() because it disables preeemption,
> i.e. it was not a "design choice". I'd rather phrase this as
> along the lines:
>
> "Migrate to the newer kmap_local_page() interface from kmap_atomic()
> in order to move away from per-CPU maps to pre-task_struct maps.
> This in effect removes the need to disable preemption in the
> local CPU while kmap is active, and thus vastly reduces overall
> system latency."
>
> Can be improved or written completely otherwise. I just wrote it
> in the way that I had understood the whole deal in the first place.
>
> BR, Jarkko
Thanks for looking into this Jarkko - I will update the commit log for
the next version.
Kristen
prev parent reply other threads:[~2022-10-13 16:04 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-09-29 16:06 Kristen Carlson Accardi
2022-09-30 21:55 ` Jarkko Sakkinen
2022-10-06 20:37 ` Fabio M. De Francesco
2022-10-06 20:45 ` Dave Hansen
2022-10-06 21:26 ` Ira Weiny
2022-10-06 22:02 ` Fabio M. De Francesco
2022-10-06 22:29 ` Dave Hansen
2022-10-06 23:17 ` Ira Weiny
2022-10-07 15:23 ` Ira Weiny
2022-10-12 7:15 ` Jarkko Sakkinen
2022-10-12 7:26 ` Jarkko Sakkinen
2022-10-12 14:13 ` Dave Hansen
2022-10-12 14:50 ` Jarkko Sakkinen
2022-10-12 15:50 ` Jarkko Sakkinen
2022-10-13 16:03 ` Kristen Carlson Accardi [this message]
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=26cfc85cf1beebc600428e24f12f49c961540071.camel@linux.intel.com \
--to=kristen@linux.intel.com \
--cc=bp@alien8.de \
--cc=dave.hansen@intel.com \
--cc=dave.hansen@linux.intel.com \
--cc=hpa@zytor.com \
--cc=ira.weiny@intel.com \
--cc=jarkko@kernel.org \
--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
Powered by JetHome