Re: [PATCH] A new entry for /proc

From: Hugh Dickins (hugh_at_veritas.com)
Date: 02/28/05

  • Next message: Steven Rostedt: "Re: Scheduler question in __wake_up_common() - Real Time Apps"
    Date:	Mon, 28 Feb 2005 20:41:31 +0000 (GMT)
    To: Mauricio Lin <mauriciolin@gmail.com>
    
    

    On Mon, 28 Feb 2005, Mauricio Lin wrote:
    >
    > Now I am testing with /proc/pid/smaps and the values are showing that
    > the old one is faster than the new one. So I will keep using the old
    > smaps version.

    Sorry, I don't have time for more than the briefest look.

    It appears that your old resident_mem_size method is just checking
    pte_present, whereas your new smaps_pte_range method is also doing
    pte_page (yet no prior check for pfn_valid: wrong) and checking
    !PageReserved i.e. accessing the struct page corresponding to each
    pte. So it's not a fair comparison, your new method is accessing
    many more cachelines than your old method.

    Though it's correct to check pfn_valid and !PageReserved to get the
    same total rss as would be reported elsewhere, I'd suggest that it's
    really not worth the overhead of those struct page accesses: just
    stick with the pte_present test.

    Your smaps_pte_range is missing pte_unmap?

    Hugh
    -
    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/


  • Next message: Steven Rostedt: "Re: Scheduler question in __wake_up_common() - Real Time Apps"