- Subject: Re: [PATCH 3/3] x86: add local_tlb_flush_kernel_range()
- From: Seth Jennings <sjenning@xxxxxxxxxxxxxxxxxx>
- Date: Wed, 27 Jun 2012 13:35:19 -0500
- Cc: devel@xxxxxxxxxxxxxxxxxxxx, Dan Magenheimer <dan.magenheimer@xxxxxxxxxx>, Alex Shi <alex.shi@xxxxxxxxx>, linux-mm@xxxxxxxxx, Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>, linux-kernel@xxxxxxxxxxxxxxx, Minchan Kim <minchan@xxxxxxxxxx>, Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>, Robert Jennings <rcj@xxxxxxxxxxxxxxxxxx>, Nitin Gupta <ngupta@xxxxxxxxxx>
- Delivered-to: devel@xxxxxxxxxxxxxxxxxxxx
- In-reply-to: <20120627153911.GH17154@phenom.dumpdata.com>
- User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:13.0) Gecko/20120615 Thunderbird/13.0.1
On 06/27/2012 10:39 AM, Konrad Rzeszutek Wilk wrote:
> On Wed, Jun 27, 2012 at 08:12:56AM -0700, Dan Magenheimer wrote:
>>> From: Minchan Kim [mailto:minchan@xxxxxxxxxx]
>>> Subject: Re: [PATCH 3/3] x86: add local_tlb_flush_kernel_range()
>>>
>>> Hello,
>>>
>>> On 06/27/2012 03:14 PM, Alex Shi wrote:
>>>
>>>> On 06/27/2012 01:53 PM, Minchan Kim wrote:
>>>>
>>>>> On 06/26/2012 01:14 AM, Seth Jennings wrote:
>>>>>
>>>>>> This patch adds support for a local_tlb_flush_kernel_range()
>>>>>> function for the x86 arch. This function allows for CPU-local
>>>>>> TLB flushing, potentially using invlpg for single entry flushing,
>>>>>> using an arch independent function name.
>>>>>>
>>>>>> Signed-off-by: Seth Jennings <sjenning@xxxxxxxxxxxxxxxxxx>
>>>>>
>>>>>
>>>>> Anyway, we don't matter INVLPG_BREAK_EVEN_PAGES's optimization point is 8 or something.
>>>>
>>>>
>>>> Different CPU type has different balance point on the invlpg replacing
>>>> flush all. and some CPU never get benefit from invlpg, So, it's better
>>>> to use different value for different CPU, not a fixed
>>>> INVLPG_BREAK_EVEN_PAGES.
>>>
>>> I think it could be another patch as further step and someone who are
>>> very familiar with architecture could do better than.
>>> So I hope it could be merged if it doesn't have real big problem.
>>>
>>> Thanks for the comment, Alex.
>>
>> Just my opinion, but I have to agree with Alex. Hardcoding
>> behavior that is VERY processor-specific is a bad idea. TLBs should
>> only be messed with when absolutely necessary, not for the
>> convenience of defending an abstraction that is nice-to-have
>> but, in current OS kernel code, unnecessary.
>
> At least put a big fat comment in the patch saying:
> "This is based on research done by Alex, where ...
I can do this.
--
Seth
_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/devel
[Video for Linux]
[Mplayer Users]
[Linux USB Devel]
[Linux Audio Users]
[Photos]
[Yosemite Photos]
[Free Singles Community]
[Linux Kernel]
[Linux SCSI]
[XFree86]
[Devices]
[Yosemite Backpacking]