lkml.org 
[lkml]   [2005]   [Mar]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [PATCH] A new entry for /proc
    Hi,

    Here are some values about the experiments. The values are the elapsed
    real time used by the process, in seconds. Each row corresponds to
    10000 cat /proc/pid/smaps command.

    Old smaps
    19.41
    19.31
    21.38
    20.16

    New smaps
    16.82
    16.75
    16.75
    16.79


    BR,

    Mauricio Lin.

    On Tue, 1 Mar 2005 10:17:56 -0400, Mauricio Lin <mauriciolin@gmail.com> wrote:
    > Well,
    >
    > It is working better now. You are right Hugh. Now the new version is
    > faster than the old one. I removed the struct page and its related
    > function.
    >
    > Thanks,
    >
    > BR,
    >
    > Mauricio Lin.
    >
    > On Tue, 1 Mar 2005 04:08:15 -0400, Mauricio Lin <mauriciolin@gmail.com> wrote:
    > > On Mon, 28 Feb 2005 20:41:31 +0000 (GMT), Hugh Dickins <hugh@veritas.com> wrote:
    > > > 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.
    > > So, I can remove the PageReserved macro without no problems, right?
    > >
    > >
    > > >
    > > > Your smaps_pte_range is missing pte_unmap?
    > > Yes, but I already fixed this problem. Paul Mundt has checked the
    > > unmap missing.
    > >
    > > Thanks,
    > >
    > > Let me perform new experiments now.
    > >
    > > BR,
    > >
    > > Mauricio Lin.
    > >
    >
    -
    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/

    \
     
     \ /
      Last update: 2005-03-22 14:10    [W:0.022 / U:65.452 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site