All of lore.kernel.org
 help / color / mirror / Atom feed
* Re: [LTP] [PATCH] mem/tunable: new testcase about max_map_count tunable
       [not found] ` <1cf48238f2cc23c9e93310ca22617296cb8a8f51.1329113234.git.zliu@redhat.com>
@ 2012-02-13 14:20   ` Caspar Zhang
  2012-02-16 19:30     ` Cyril Hrubis
  0 siblings, 1 reply; 2+ messages in thread
From: Caspar Zhang @ 2012-02-13 14:20 UTC (permalink / raw)
  To: ltp-list

On 02/13/2012 02:18 PM, Zhouping Liu wrote:
> 
> The program is designed to test max_map_count tunable file
> 
> The kernel Documentation say that:
> /proc/sys/vm/max_map_count contains the maximum number of memory map
> areas a process may have. Memory map areas are used as a side-effect
> of calling malloc, directly by mmap and mprotect, and also when
> loading shared libraries.
> 
> Each process has his own maps file: /proc/[pid]/maps, and each line
> indicates a map entry, so it can caculate the amount of maps by reading
> the file lines' number to check the tunable performance.
> 
> The program trys to invoke mmap() endless until triggering MAP_FAILED,
> then read the process's maps file /proc/[pid]/maps, save the line number
> to map_count variable, and compare it with /proc/sys/vm/max_map_count,
> map_count should less than max_map_count.
> Note: There are two special vmas VDSO and VSYSCALL, which are allocated
> via install_special_mapping(), install_specail_mapping() allows the VMAs
> to be allocated and inserted without checking the sysctl_map_map_count,
> and each /proc/<pid>/maps has both at the end:
> ...
> ...
> 7fff7b9ff000-7fff7ba00000 r-xp 00000000 00:00 0           [vdso]
> ffffffffff600000-ffffffffff601000 r-xp 00000000 00:00 0   [vsyscall]
> 
> so during comparing with map_count and /proc/sys/vm/max_map_count,
> we should except the two special vmas from map_count:
> map_count -= 2;
> 
> While most applications need less than a thousand maps, and the tunable
> default value is 65530.
> When the value is too large or too little, the system would hang, so I
> choose four special value to test, which can coverage most situation:
> a) Default value / 100
> b) Default value / 10
> c) Default value
> d) Default value * 10
> 
> Signed-off-by: Zhouping Liu <zliu@redhat.com>
> ---
>  runtest/mm                                   |    2 +
>  testcases/kernel/mem/tunable/max_map_count.c |  197 ++++++++++++++++++++++++++
>  2 files changed, 199 insertions(+), 0 deletions(-)
>  create mode 100644 testcases/kernel/mem/tunable/max_map_count.c
> 

Acked-by: Caspar Zhang <caspar@casparzhang.com>


------------------------------------------------------------------------------
Try before you buy = See our experts in action!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-dev2
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [LTP] [PATCH] mem/tunable: new testcase about max_map_count tunable
  2012-02-13 14:20   ` [LTP] [PATCH] mem/tunable: new testcase about max_map_count tunable Caspar Zhang
@ 2012-02-16 19:30     ` Cyril Hrubis
  0 siblings, 0 replies; 2+ messages in thread
From: Cyril Hrubis @ 2012-02-16 19:30 UTC (permalink / raw)
  To: Caspar Zhang; +Cc: ltp-list

Hi!
> > ---
> >  runtest/mm                                   |    2 +
> >  testcases/kernel/mem/tunable/max_map_count.c |  197 ++++++++++++++++++++++++++
> >  2 files changed, 199 insertions(+), 0 deletions(-)
> >  create mode 100644 testcases/kernel/mem/tunable/max_map_count.c
> > 
> 
> Acked-by: Caspar Zhang <caspar@casparzhang.com>
> 

Looks good, feel free to commit.

-- 
Cyril Hrubis
chrubis@suse.cz

------------------------------------------------------------------------------
Virtualization & Cloud Management Using Capacity Planning
Cloud computing makes use of virtualization - but cloud computing 
also focuses on allowing computing to be delivered as a service.
http://www.accelacomm.com/jaw/sfnl/114/51521223/
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2012-02-16 19:30 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <541a69a479af6ba8c2ce0af8ab890851dfed4caa.1329113234.git.zliu@redhat.com>
     [not found] ` <1cf48238f2cc23c9e93310ca22617296cb8a8f51.1329113234.git.zliu@redhat.com>
2012-02-13 14:20   ` [LTP] [PATCH] mem/tunable: new testcase about max_map_count tunable Caspar Zhang
2012-02-16 19:30     ` Cyril Hrubis

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.