From: Topi Miettinen <toiwoton@gmail.com>
To: Richard Weinberger <richard@nod.at>, linux-kernel@vger.kernel.org
Cc: "Jonathan Corbet" <corbet@lwn.net>,
"Tony Luck" <tony.luck@intel.com>,
"Fenghua Yu" <fenghua.yu@intel.com>,
"Alexander Graf" <agraf@suse.com>,
"Paolo Bonzini" <pbonzini@redhat.com>,
"Radim Krčmář" <rkrcmar@redhat.com>,
"Benjamin Herrenschmidt" <benh@kernel.crashing.org>,
"Paul Mackerras" <paulus@samba.org>,
"Michael Ellerman" <mpe@ellerman.id.au>,
"Thomas Gleixner" <tglx@linutronix.de>,
"Ingo Molnar" <mingo@redhat.com>,
"H. Peter Anvin" <hpa@zytor.com>,
"maintainer:X86 ARCHITECTURE (32-BIT AND 64-BIT)"
<x86@kernel.org>, "Doug Ledford" <dledford@redhat.com>,
"Sean Hefty" <sean.hefty@intel.com>,
"Hal Rosenstock" <hal.rosenstock@gmail.com>,
"Mike Marciniszyn" <mike.marciniszyn@intel.com>,
"Dennis Dalessandro" <dennis.dalessandro@intel.com>,
"Christian Benvenuti" <benve@cisco.com>,
"Dave Goodell" <dgoodell@cisco.com>,
"Sudeep Dutt" <sudeep.dutt@intel.com>,
"Ashutosh Dixit" <ashutosh.dixit@inte>
Subject: Re: [PATCH 00/14] Present useful limits to user (v2)
Date: Fri, 15 Jul 2016 17:19:14 +0000 [thread overview]
Message-ID: <cf28b6b8-6d0d-8ce2-f3dc-953b9bee12d1@gmail.com> (raw)
In-Reply-To: <5788F0E1.8090203@nod.at>
On 07/15/16 14:19, Richard Weinberger wrote:
> Hi!
>
> Am 15.07.2016 um 12:35 schrieb Topi Miettinen:
>> Hello,
>>
>> There are many basic ways to control processes, including capabilities,
>> cgroups and resource limits. However, there are far fewer ways to find out
>> useful values for the limits, except blind trial and error.
>>
>> This patch series attempts to fix that by giving at least a nice starting
>> point from the highwater mark values of the resources in question.
>> I looked where each limit is checked and added a call to update the mark
>> nearby.
>>
>> Example run of program from Documentation/accounting/getdelauys.c:
>>
>> ./getdelays -R -p `pidof smartd`
>> printing resource accounting
>> RLIMIT_CPU=0
>> RLIMIT_FSIZE=0
>> RLIMIT_DATA=18198528
>> RLIMIT_STACK=135168
>> RLIMIT_CORE=0
>> RLIMIT_RSS=0
>> RLIMIT_NPROC=1
>> RLIMIT_NOFILE=55
>> RLIMIT_MEMLOCK=0
>> RLIMIT_AS=130879488
>> RLIMIT_LOCKS=0
>> RLIMIT_SIGPENDING=0
>> RLIMIT_MSGQUEUE=0
>> RLIMIT_NICE=0
>> RLIMIT_RTPRIO=0
>> RLIMIT_RTTIME=0
>>
>> ./getdelays -R -C /sys/fs/cgroup/systemd/system.slice/smartd.service/
>> printing resource accounting
>> sleeping 1, blocked 0, running 0, stopped 0, uninterruptible 0
>> RLIMIT_CPU=0
>> RLIMIT_FSIZE=0
>> RLIMIT_DATA=18198528
>> RLIMIT_STACK=135168
>> RLIMIT_CORE=0
>> RLIMIT_RSS=0
>> RLIMIT_NPROC=1
>> RLIMIT_NOFILE=55
>> RLIMIT_MEMLOCK=0
>> RLIMIT_AS=130879488
>> RLIMIT_LOCKS=0
>> RLIMIT_SIGPENDING=0
>> RLIMIT_MSGQUEUE=0
>> RLIMIT_NICE=0
>> RLIMIT_RTPRIO=0
>> RLIMIT_RTTIME=0
>>
>> In this example, smartd is running as a non-root user. The presented
>> values can be used as a starting point for giving new limits to the
>> service.
>
> I don't think it is worth sprinkling the kernel with update_resource_highwatermark()
> calls just to get these metrics.
>
> Can't we teach the existing perf infrastructure to collect these highwatermarks for us?
I don't know. What kind of changes do you think would be needed?
-Topi
>
> Thanks,
> //richard
>
--
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:[~2016-07-15 17:19 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-07-15 10:35 [PATCH 00/14] Present useful limits to user (v2) Topi Miettinen
2016-07-15 10:35 ` [PATCH 09/14] resource limits: track highwater mark of locked memory Topi Miettinen
2016-07-15 15:14 ` Oleg Nesterov
2016-07-15 17:39 ` Topi Miettinen
2016-07-18 15:38 ` Oleg Nesterov
2016-07-15 12:43 ` [PATCH 00/14] Present useful limits to user (v2) Peter Zijlstra
2016-07-15 13:52 ` Topi Miettinen
2016-07-15 13:59 ` Peter Zijlstra
2016-07-15 16:57 ` Topi Miettinen
2016-07-15 20:54 ` H. Peter Anvin
2016-07-15 13:04 ` Balbir Singh
2016-07-15 16:35 ` Topi Miettinen
2016-07-18 22:05 ` Doug Ledford
2016-07-19 16:53 ` Topi Miettinen
2016-07-15 14:19 ` Richard Weinberger
2016-07-15 17:19 ` Topi Miettinen [this message]
2016-07-18 21:25 ` Doug Ledford
2016-08-03 18:20 ` Topi Miettinen
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=cf28b6b8-6d0d-8ce2-f3dc-953b9bee12d1@gmail.com \
--to=toiwoton@gmail.com \
--cc=agraf@suse.com \
--cc=ashutosh.dixit@inte \
--cc=benh@kernel.crashing.org \
--cc=benve@cisco.com \
--cc=corbet@lwn.net \
--cc=dennis.dalessandro@intel.com \
--cc=dgoodell@cisco.com \
--cc=dledford@redhat.com \
--cc=fenghua.yu@intel.com \
--cc=hal.rosenstock@gmail.com \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mike.marciniszyn@intel.com \
--cc=mingo@redhat.com \
--cc=mpe@ellerman.id.au \
--cc=paulus@samba.org \
--cc=pbonzini@redhat.com \
--cc=richard@nod.at \
--cc=rkrcmar@redhat.com \
--cc=sean.hefty@intel.com \
--cc=sudeep.dutt@intel.com \
--cc=tglx@linutronix.de \
--cc=tony.luck@intel.com \
--cc=x86@kernel.org \
/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).