[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <5432FEB8.401@imgtec.com>
Date: Mon, 6 Oct 2014 13:42:32 -0700
From: Leonid Yegoshin <Leonid.Yegoshin@...tec.com>
To: Paul Burton <paul.burton@...tec.com>
CC: <linux-mips@...ux-mips.org>, <Zubair.Kakakhel@...tec.com>,
<david.daney@...ium.com>, <peterz@...radead.org>,
<paul.gortmaker@...driver.com>, <davidlohr@...com>,
<macro@...ux-mips.org>, <chenhc@...ote.com>, <zajec5@...il.com>,
<james.hogan@...tec.com>, <keescook@...omium.org>,
<alex@...x-smith.me.uk>, <tglx@...utronix.de>,
<blogic@...nwrt.org>, <jchandra@...adcom.com>,
<qais.yousef@...tec.com>, <linux-kernel@...r.kernel.org>,
<ralf@...ux-mips.org>, <markos.chandras@...tec.com>,
<manuel.lauss@...il.com>, <akpm@...ux-foundation.org>,
<lars.persson@...s.com>
Subject: Re: [PATCH 2/3] MIPS: Setup an instruction emulation in VDSO protected
page instead of user stack
On 10/06/2014 05:29 AM, Paul Burton wrote:
>>
>> First some general questions: is there any reason to need the page used
>> to be at the same virtual address for each thread? I can't think of one,
>> and if that's the case then why not simply allocate a series of pages
>> per-thread via mmap_region or similar, on demand when a thread first
>> executes an FP branch instruction? That would of course consume some
>> more virtual address space, but would avoid the hassles of manually
>> prodding at the TLB, tracking ASIDs & flushing the caches. Perhaps the
>> shrinker interface could be used to allow freeing those pages if & when
>> it becomes necessary for long running threads.
The only reason to have the same virtual address is to keep mmap
accounting the same. An original 'VDSO' is presented in mmap for all
threads of the same mmap.
As for another approach, I think it may be too much code to handle it
and too much implicit interlinks with common Linux code and GLIBC/bionic.
>>
>> Also VDSO is really a misnomer throughout, as I've pointed out to you
>> before. I'm aware it's an existing misnomer, but it would be nice if
>> we could clear that up rather than repeat it...
>>
Yes, I agree but that is outside of this patch. I think it has sense to
rename the current stuff to something like "Emulation" right before some
patch which implement the real VDSO capability on MIPS.
>> + if (get_isa16_mode(regs->cp0_epc)) {
>> + *(u16 *)&fr->emul = (u16)(ir >> 16);
>> + *((u16 *)(&fr->emul) + 1) = (u16)(ir & 0xffff);
> This microMIPS case doesn't set badinst, as I pointed out internally.
Thank you, I missed it, may be due to long citation. I will add it.
> I
> think it would be much cleaner if you were to do something along the
> lines of:
>
I try to keep it as close as an original code for better understanding.
Even with it there are questions.
Your variant may be cleaner but it may be some next style change patch.
- Leonid.
--
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