Quantcast
Channel: lkml.org : Shesha Sreenivasamurthy
Viewing all articles
Browse latest Browse all 1267

Re: [PATCHv2] mm, page_vma_mapped: Drop faulty pointer arithmetics ...

$
0
0
Linus Torvalds writes: (Summary) The "page_to_pfn()" logic can be pretty expensive (exactly for the sparsemem case, but per-node DISCOTIGMEM has some complexity too.
per-node DISCOTIGMEM has some complexity too.
So I'd prefer to make that explicit, perhaps by having a helper function that does this something like
function that does this something like
static inline bool pfn_in_hpage(unsigned long pfn, struct page *hpage)
   {
        unsigned long hpage_pfn = page_to_pfn(hpage);

        return pfn >= hpage_pfn &&  pfn - hpage_pfn <

Viewing all articles
Browse latest Browse all 1267

Trending Articles