Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1296855

Re: isolate_lru_page on !head pages

From Vlastimil Babka <vbabka@suse.cz>
Newsgroups linux.kernel
Subject Re: isolate_lru_page on !head pages
Date 2015-12-22 16:50 +0100
Message-ID <qIxmj-5MK-23@gated-at.bofh.it> (permalink)
References <qDMFk-nF-7@gated-at.bofh.it> <qFA6Z-5XO-11@gated-at.bofh.it> <qFTCH-1Fp-7@gated-at.bofh.it> <qFWAz-3Su-33@gated-at.bofh.it> <qG17c-6Oe-17@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On 12/15/2015 05:59 PM, Michal Hocko wrote:
>>
>> head page is what linked into LRU, but not nessesary the way we obtain the
>> page to check. If we check PageLRU(pte_page(*pte)) it should produce the
>> right result.
>
> I am not following you here. Any pfn walk could get to a tail page and
> if we happen to do e.g. isolate_lru_page we have to remember that we
> should always treat compound page differently. This is subtle.

I think the problem is that isolate_lru_page() is not the only reason 
for calling PageLRU(). And the other use cases have different 
expectations, to either way (PF_ANY or PF_HEAD) you pick for PageLRU(), 
somebody will have to be careful. IMHO usually it's pfn scanners who 
have to be careful for many reasons...

> Anyway I
> am far from understading other parts of the refcount rework so I will
> spend time studying the code as soon as the time permits. In the
> meantime I agree that VM_BUG_ON_PAGE(PageTail(page), page) would be
> useful to catch all the fallouts.

+1

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

Back to linux.kernel | Previous | Next — Previous in thread | Find similar | Unroll thread


Thread

Re: isolate_lru_page on !head pages "Kirill A. Shutemov" <kirill@shutemov.name> - 2015-12-14 13:10 +0100
  Re: isolate_lru_page on !head pages Michal Hocko <mhocko@kernel.org> - 2015-12-15 10:00 +0100
    Re: isolate_lru_page on !head pages "Kirill A. Shutemov" <kirill@shutemov.name> - 2015-12-15 13:10 +0100
      Re: isolate_lru_page on !head pages Michal Hocko <mhocko@kernel.org> - 2015-12-15 18:00 +0100
        Re: isolate_lru_page on !head pages Vlastimil Babka <vbabka@suse.cz> - 2015-12-22 16:50 +0100

csiph-web