Re: [PATCH RFC 2/2] mm: introdule compound_head_by_tail()

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

 



On Mon, Apr 28, 2014 at 11:55 PM, Peter Zijlstra <peterz@xxxxxxxxxxxxx> wrote:
> What version,

the code snipt in question is extracted from v3.15-rc3.


for the (1) check in previous email, its assembled code looks like:

       --- (1) snipt ---
       mov    (%rdi),%rax                               (a)
       test   $0x80,%ah                                  (b)
       jne    754 <put_compound_page+0x74> (c)
       --- (1) snipt ---

      (a) %rdi is the struct page pointer
      (b) check if PG_tail(0x80) set(likely not set, we tell the compiler)
      (c) if set, jump; not set, fall through (good, credit to  our hint)

===================================================

for the (3) check in previous email, its assembled code looks like:

        --- (3) snipt ---
        mov    (%rdi),%rax                                    (A)
        mov    %rdi,%r12
        test   $0x80,%ah                                      (B)
        jne    8f8 <put_compound_page+0x218>     (C)
        --- (3) snipt ---

      (A) %rdi is the struct page pointer
      (B) check if PG_tail(0x80) set(likely set in this case, but we
tell compiler unlikely)
      (C) if set, jump; not set, fall through (god! it would better
not jump if set,  but we
           tell compiler unlikely, so it happily did as we told it)


# all code are compiled by gcc (GCC) 4.8.2

> and why didn't your changelog include this useful information?

Sorry, I would have done so.  I will resend the patch.

Thanks,
Jianyu Zhan

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@xxxxxxxxx.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@xxxxxxxxx";> email@xxxxxxxxx </a>




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]