[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Thu, 9 Oct 2014 17:07:11 -0700
From: Leonid Yegoshin <Leonid.Yegoshin@...tec.com>
To: James Hogan <james.hogan@...tec.com>
CC: <linux-mips@...ux-mips.org>, <Zubair.Kakakhel@...tec.com>,
<geert+renesas@...der.be>, <david.daney@...ium.com>,
<peterz@...radead.org>, <paul.gortmaker@...driver.com>,
<davidlohr@...com>, <macro@...ux-mips.org>, <chenhc@...ote.com>,
<richard@....at>, <zajec5@...il.com>, <keescook@...omium.org>,
<alex@...x-smith.me.uk>, <tglx@...utronix.de>,
<blogic@...nwrt.org>, <jchandra@...adcom.com>,
<paul.burton@...tec.com>, <qais.yousef@...tec.com>,
<linux-kernel@...r.kernel.org>, <ralf@...ux-mips.org>,
<markos.chandras@...tec.com>, <dengcheng.zhu@...tec.com>,
<manuel.lauss@...il.com>, <akpm@...ux-foundation.org>,
<lars.persson@...s.com>
Subject: Re: [PATCH v2 2/3] MIPS: Setup an instruction emulation in VDSO protected
page instead of user stack
On 10/09/2014 04:40 PM, James Hogan wrote:
>
>> It may be a case for mix of FPU and MIPS R6 emulations. I just keep both
>> emulators separate as much as possible but I assume that without prove
>> it may be stackable - some rollback is needed to join both and it may
>> (probably) cause a double emulation setup - dsemul may be called twice
>> for the same pair of instructions. I didn't see that yet, honestly and
>> you may be right.
> If the only time they're used is for emulation of a branch delay slot
> instruction which should never be another branch, and signals always
> undo the emuframe before being handled (btw, should the BD bit in cause
> get set if rewinding for signal handlers/gdb?), then it stands to reason
> it should never nest.
I don't want to give a chance. If it is proved excessive, then slashing
it - 15minutes, it doesn't harm.
OK, I will spend some time to look into that, it have sense to
reconsider after unwinding signals.
>
> You could then avoid the whole stack and per-thread thing and just have
> a maximum of one emuframe dedicated to each thread or allocated on
> demand, and if there genuinely is a use case for nesting later on, worry
> about it then.
As I understand, you propose to allocate some space in mmap.
This requires a stuff to handle allocation of user space beyond VMAs.
It also may have some pain during thread creation, stopping and
subsequent cloning because that memory allocator should service that
events too and it may be not easy if emulation blocks are packed into
page. If it is not packed then it waste of user space and put additional
constraint to number of thread on single mmap.
Some cooperation with GLIBC may be needed to prevent re-use of user
address space, at a moment not sure the extent of it.
I estimated that it can be much more troubling.
>
> So long as the kernel handles a long sequence of sequential emulated
> branches gracefully (not necessarily correctly).
>
I don't understand a question. Each pair/single instruction is emulated
separately but there is some pipeline of that, even in FPU emulator, it
is just not this patch issue.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists