lkml.org 
[lkml]   [2012]   [May]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v5 5/7] x86/tlb: add tlb_flushall_shift for specific CPU
On 05/17/2012 01:55 AM, H. Peter Anvin wrote:

> On 05/15/2012 11:49 PM, Alex Shi wrote:
>> + if (!cpu_has_invlpg || vma->vm_flags & VM_HUGETLB
>> + || tlb_flushall_shift == (u16)TLB_FLUSH_ALL) {
>
> I asked for you to fold the cpu_has_invlpg test into tlb_flushall_shift.
> Also, (u16)TLB_FLUSH_ALL really is hit up with the ugly stick... why on
> earth is this u16? It's a bit shift, so it can't be bigger than 6 bits
> anyway... and if you want to be able to use -1 as a sentinel you might
> as well make it a signed value and use < 0 or == -1 as the test.


!cpu_has_invlpg be moved in next patch, but surely, it is better to be
removed here too.

Sure, u16 make code looks ugly. So, s8 is better and worth to add value
check on later knob patch. Since this change cause later patch
modification. I am going to re-update whole patches.
>

> Am I missing something really fundamental here?


No.

>
> -hpa
>




\
 
 \ /
  Last update: 2012-05-17 04:21    [W:0.287 / U:0.176 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site