lkml.org 
[lkml]   [2012]   [May]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [PATCH v4 5/7] x86/tlb: add tlb flush all factor for specific CPU
    On 05/10/2012 06:42 PM, Borislav Petkov wrote:

    > On Thu, May 10, 2012 at 11:38:35AM +0200, Peter Zijlstra wrote:
    >> On Thu, 2012-05-10 at 13:00 +0800, Alex Shi wrote:
    >>
    >>
    >>> +void intel_tlb_flushall_factor_set(struct cpuinfo_x86 *c)
    >>> +{
    >>> + if (!cpu_has_invlpg) {
    >>> + tlb_flushall_factor = -1;
    >>> + return;
    >>> + }
    >>
    >> ...
    >>
    >>> + if (!cpu_has_invlpg || vma->vm_flags & VM_HUGETLB
    >>> + || tlb_flushall_factor == (u16)TLB_FLUSH_ALL)
    >>> {
    >>> flush_all:
    >>
    >> Since you set tlb_flushall_factor (I'd have called it _shift)
    >
    > Seconded, tlb_flushall_shift makes more sense, considering how it is
    > being used.


    OK. I will change the name.

    >
    >> to -1 when !invlpg there's a redundant check in there.
    >




    \
     
     \ /
      Last update: 2012-05-11 03:21    [W:0.024 / U:1.456 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site