public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Ingo Molnar <mingo2.kernel.org@gmail.com>
To: "Bryan O'Donoghue" <pure.logic@nexus-software.ie>
Cc: tglx@linutronix.de, mingo@redhat.com, hpa@zytor.com,
	x86@kernel.org, dvhart@infradead.org, andy.schevchenko@gmail.com,
	boon.leong.ong@intel.com, linux-kernel@vger.kernel.org,
	platform-driver-x86@vger.kernel.org, derek.browne@intel.com,
	josef.ahmad@intel.com, erik.nyquist@intel.com
Subject: Re: [PATCH 1/2] x86/quark: Add Quark embedded SRAM support
Date: Wed, 6 May 2015 11:58:58 +0200	[thread overview]
Message-ID: <20150506095858.GA16458@gmail.com> (raw)
In-Reply-To: <1430705875-6990-2-git-send-email-pure.logic@nexus-software.ie>


* Bryan O'Donoghue <pure.logic@nexus-software.ie> wrote:

> +/**
> + * esram_page_overlay - Overlay a page with fast access eSRAM.
> + *
> + * This function takes a 4 KiB aligned physical address and programs an
> + * eSRAM page to overlay that 4 KiB region. We require and verify that the
> + * target memory is read-write - since we don't support overlay of read-only
> + * memory regions - such as kernel .text areas. Overlay of .text areas is
> + * not supported because eSRAM isn't self-populating and we cannot guarantee
> + * atomicity of the overlay operation. It is assumed and required that the
> + * caller of the overlay function is overlaying a data buffer not kernel
> + * code.

So if this SRAM truly has L1 speeds then overlaying kernel text would 
sure be a lovely usecase!

Which part of the overlay operation is inatomic? Could we solve it by 
double buffering: first creating a temporary buffer, mapping the eSRAM 
pages there and copying kernel text to it?

Now that we've populated it, we only have to remap the eSRAM to the 
real kernel text pages.

Its inatomicity should not matter: whether the CPU fetches from DRAM 
or from eSRAM, it should be the same content.

Once the remapping is done, the double buffer can be freed.

Likewise, the text of kernel modules could be eSRAM cached as well, 
although core kernel text is probably even more beneficial.

Thanks,

	Ingo

  parent reply	other threads:[~2015-05-06  9:59 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-05-04  2:17 [PATCH 0/2] x86/quark: Add eSRAM driver and test code Bryan O'Donoghue
2015-05-04  2:17 ` [PATCH 1/2] x86/quark: Add Quark embedded SRAM support Bryan O'Donoghue
2015-05-04 15:00   ` Thomas Gleixner
2015-05-05 13:48     ` Bryan O'Donoghue
2015-05-05 20:07       ` Darren Hart
2015-05-05 22:19     ` H. Peter Anvin
2015-05-05  8:44   ` Paul Bolle
2015-05-05 13:03     ` Bryan O'Donoghue
2015-05-06  9:58   ` Ingo Molnar [this message]
2015-05-06 15:46     ` Bryan O'Donoghue
2015-05-04  2:17 ` [PATCH 2/2] x86/quark: Add Quark embedded SRAM self-test Bryan O'Donoghue
2015-05-05  8:34   ` Paul Bolle
2015-05-06 10:02   ` Ingo Molnar
2015-05-06 14:27     ` Bryan O'Donoghue
2015-05-06 10:08   ` Ingo Molnar
2015-05-06  9:52 ` [PATCH 0/2] x86/quark: Add eSRAM driver and test code Ingo Molnar
2015-05-06 15:27   ` Bryan O'Donoghue

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=20150506095858.GA16458@gmail.com \
    --to=mingo2.kernel.org@gmail.com \
    --cc=andy.schevchenko@gmail.com \
    --cc=boon.leong.ong@intel.com \
    --cc=derek.browne@intel.com \
    --cc=dvhart@infradead.org \
    --cc=erik.nyquist@intel.com \
    --cc=hpa@zytor.com \
    --cc=josef.ahmad@intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=platform-driver-x86@vger.kernel.org \
    --cc=pure.logic@nexus-software.ie \
    --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