From: Michal Hocko <mhocko@kernel.org>
To: Vlastimil Babka <vbabka@suse.cz>
Cc: Andrew Morton <akpm@linux-foundation.org>,
linux-mm@kvack.org, linux-kernel@vger.kernel.org,
Jerome Marchand <jmarchan@redhat.com>,
Hugh Dickins <hughd@google.com>,
Peter Zijlstra <peterz@infradead.org>,
Oleg Nesterov <oleg@redhat.com>,
linux-api@vger.kernel.org, linux-doc@vger.kernel.org,
Konstantin Khlebnikov <khlebnikov@yandex-team.ru>
Subject: Re: [PATCH v5 4/6] mm, proc: reduce cost of /proc/pid/smaps for unpopulated shmem mappings
Date: Thu, 19 Nov 2015 11:13:33 +0100 [thread overview]
Message-ID: <20151119101333.GC8494@dhcp22.suse.cz> (raw)
In-Reply-To: <1447838976-17607-5-git-send-email-vbabka@suse.cz>
On Wed 18-11-15 10:29:34, Vlastimil Babka wrote:
> Following the previous patch, further reduction of /proc/pid/smaps cost is
> possible for private writable shmem mappings with unpopulated areas where
> the page walk invokes the .pte_hole function. We can use radix tree iterator
> for each such area instead of calling find_get_entry() in a loop. This is
> possible at the extra maintenance cost of introducing another shmem function
> shmem_partial_swap_usage().
>
> To demonstrate the diference, I have measured this on a process that creates a
> private writable 2GB mapping of a partially swapped out /dev/shm/file (which
> cannot employ the optimizations from the prvious patch) and doesn't populate it
> at all. I time how long does it take to cat /proc/pid/smaps of this process 100
> times.
>
> Before this patch:
>
> real 0m3.831s
> user 0m0.180s
> sys 0m3.212s
>
> After this patch:
>
> real 0m1.176s
> user 0m0.180s
> sys 0m0.684s
>
> The time is similar to case where radix tree iterator is employed on the whole
> mapping.
>
> Signed-off-by: Vlastimil Babka <vbabka@suse.cz>
Looks good as well.
Acked-by: Michal Hocko <mhocko@suse.com>
[...]
--
Michal Hocko
SUSE Labs
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
next prev parent reply other threads:[~2015-11-19 10:13 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-11-18 9:29 [PATCH v5 0/6] enhance shmem process and swap accounting Vlastimil Babka
[not found] ` <1447838976-17607-1-git-send-email-vbabka-AlSwsSmVLrQ@public.gmane.org>
2015-11-18 9:29 ` [PATCH v5 1/6] mm, documentation: clarify /proc/pid/status VmSwap limitations for shmem Vlastimil Babka
2015-11-18 9:29 ` [PATCH v5 2/6] mm, proc: account for shmem swap in /proc/pid/smaps Vlastimil Babka
2015-11-18 9:29 ` [PATCH v5 3/6] mm, proc: reduce cost of /proc/pid/smaps for shmem mappings Vlastimil Babka
2015-11-19 10:04 ` Michal Hocko
2015-11-18 9:29 ` [PATCH v5 4/6] mm, proc: reduce cost of /proc/pid/smaps for unpopulated " Vlastimil Babka
2015-11-19 10:13 ` Michal Hocko [this message]
2015-11-18 9:29 ` [PATCH v5 5/6] mm, shmem: add internal shmem resident memory accounting Vlastimil Babka
2015-11-18 9:29 ` [PATCH v5 6/6] mm, procfs: breakdown RSS for anon, shmem and file in /proc/pid/status Vlastimil Babka
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20151119101333.GC8494@dhcp22.suse.cz \
--to=mhocko@kernel.org \
--cc=akpm@linux-foundation.org \
--cc=hughd@google.com \
--cc=jmarchan@redhat.com \
--cc=khlebnikov@yandex-team.ru \
--cc=linux-api@vger.kernel.org \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=oleg@redhat.com \
--cc=peterz@infradead.org \
--cc=vbabka@suse.cz \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).