Re: i386 PDA patches use of %gs

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



* Ingo Molnar <[email protected]> wrote:

> > My test program does the same thing, except using GDT entries 6 and 
> > 7 (selectors 0x33 and 0x3b).
> 
> no, that's not what it does. It measures 50000000 switches of the 
> _same_ selector value, without using any of the selectors in the loop 
> itself. I.e. no mixing at all! But when the kernel and userspace uses 
> %gs, it's the cost of switching between two selector values of %gs 
> that has to be measured. Your code does not measure that at all, 
> AFAICS.

for example, your test_fs() code does:

        for(i = 0; i < COUNT; i++) {
                asm volatile("push %%fs; mov %1, %%fs; addl $1, %%fs:%0; popl %%fs"
                             : "+m" (*offset): "r" (seg) : "memory");
                sync();
        }

that loads (and uses) a single selector value for %fs, and doesnt do any 
mixed use as far as i can see.

	Ingo
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux