Re: [PATCH V2 0/6] Enable NX 842 compression engine on Power9

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Nicholas Piggin [nicholas.piggin@xxxxxxxxx] wrote:
> On Mon, 17 Jul 2017 16:43:19 -0700
> Haren Myneni <haren@xxxxxxxxxxxxxxxxxx> wrote:
> 
> > [PATCH V2 0/6] Enable NX 842 compression engine on Power9
> > This patchset depends on VAS kernel changes:
> > https://lists.ozlabs.org/pipermail/linuxppc-dev/2017-May/158178.html
> 
> Just a question, we no longer invalidate the copy buffer on context
> switch after this patch:
> 
> 07d2a628bc ("powerpc/64s: Avoid cpabort in context switch when possible")
> 
> If your vas address mappings are visible only to kernel, only used in
> process / kthread context, and only used with kernel preemption disabled,
> this is okay.

Kernel preemption is not explicitly disabled in the NX driver I think
and

> 
> If userspace can possibly copy/paste to the mappings or if you need to
> sleep or call this from interrupt context, we need to work out how to
> invalidate the copy buffer.

user space cannot copy/paste to the mappings yet (that mechanism is
further out).

NX driver calls:

	vas_copy(&crb, ...);
	vas_paste(addr, ...);

but not from an interrupt context. Can/should we disable premption between
the copy/paste and to avoid having to invalidate the copy buffer?

Sukadev




[Index of Archives]     [Kernel]     [Gnu Classpath]     [Gnu Crypto]     [DM Crypt]     [Netfilter]     [Bugtraq]

  Powered by Linux