Re: [PATCH 2/3] x86/flush_tlb: try flush_tlb_single one by one inflush_tlb_range
From: Alex Shi
Date: Wed May 02 2012 - 09:25:53 EST
On 05/02/2012 09:04 PM, Nick Piggin wrote:
> On 2 May 2012 21:38, Alex Shi <alex.shi@xxxxxxxxx> wrote:
>> On 05/02/2012 05:38 PM, Borislav Petkov wrote:
>>
>>> On Wed, May 02, 2012 at 05:24:09PM +0800, Alex Shi wrote:
>>>> For some of scenario, above equation can be modified as:
>>>> (512 - X) * 100ns(assumed TLB refill cost) = X * 140ns(assumed invlpg cost)
>
> It should not be that optimistic, because that equation assumes every
> unflushed entry saves a TLB refill too.
>
Yes, it is just ideal scenario to do analysis. In the code, the judgment
depends on the 'active entries' instead of the fixed TLB line number.
active entries = min(this process's page number, TLB line number)
> I think it is always a good idea to make such fundamental primitives
> cheaper though.
>
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/