From: Oleg Nesterov <oleg@redhat.com>
To: Topi Miettinen <toiwoton@gmail.com>
Cc: linux-kernel@vger.kernel.org, "Tony Luck" <tony.luck@intel.com>,
"Fenghua Yu" <fenghua.yu@intel.com>,
"Paolo Bonzini" <pbonzini@redhat.com>,
"Radim Krčmář" <rkrcmar@redhat.com>,
"Alexander Graf" <agraf@suse.com>,
"Benjamin Herrenschmidt" <benh@kernel.crashing.org>,
"Paul Mackerras" <paulus@samba.org>,
"Michael Ellerman" <mpe@ellerman.id.au>,
"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@intel.com>,
"Alex Williamson" <alex.williamson@redhat.com>,
"Alexei Starovoitov" <ast@kernel.org>,
"Peter Zijlstra" <peterz@infradead.org>,
"Ingo Molnar" <mingo@redhat.com>,
"Arnaldo Carvalho de Melo" <acme@kernel.org>,
"Alexander Shishkin" <alexander.shishkin@linux.intel.com>,
"Andrew Morton" <akpm@linux-foundation.org>,
"Jiri Slaby" <jslaby@suse.cz>,
"Konstantin Khlebnikov" <koct9i@gmail.com>,
"Cyrill Gorcunov" <gorcunov@openvz.org>,
"Dave Hansen" <dave.hansen@linux.intel.com>,
"Thomas Gleixner" <tglx@linutronix.de>,
"Greg Kroah-Hartman" <gregkh@linuxfoundation.org>,
"Dan Carpenter" <dan.carpenter@oracle.com>,
"Vlastimil Babka" <vbabka@suse.cz>,
"Michal Hocko" <mhocko@suse.com>,
"Kirill A. Shutemov" <kirill.shutemov@linux.intel.com>,
"Eric B Munson" <emunson@akamai.com>,
"Alexey Klimov" <klimov.linux@gmail.com>,
"Andrea Arcangeli" <aarcange@redhat.com>,
"Chen Gang" <gang.chen.5i5j@gmail.com>,
"Andrey Ryabinin" <aryabinin@virtuozzo.com>,
"David Rientjes" <rientjes@google.com>,
"Hugh Dickins" <hughd@google.com>,
"Alexander Kuleshov" <kuleshovmail@gmail.com>,
"open list:IA64 (Itanium) PLATFORM" <linux-ia64@vger.kernel.org>,
"open list:KERNEL VIRTUAL MACHINE (KVM)" <kvm@vger.kernel.org>,
"open list:KERNEL VIRTUAL MACHINE (KVM) FOR POWERPC"
<kvm-ppc@vger.kernel.org>,
"open list:LINUX FOR POWERPC (32-BIT AND 64-BIT)"
<linuxppc-dev@lists.ozlabs.org>,
"open list:INFINIBAND SUBSYSTEM" <linux-rdma@vger.kernel.org>,
"open list:BPF (Safe dynamic programs and tools)"
<netdev@vger.kernel.org>,
"open list:MEMORY MANAGEMENT" <linux-mm@kvack.org>
Subject: Re: [PATCH 09/14] resource limits: track highwater mark of locked memory
Date: Fri, 15 Jul 2016 17:14:08 +0200 [thread overview]
Message-ID: <20160715151408.GA32317@redhat.com> (raw)
In-Reply-To: <1468578983-28229-10-git-send-email-toiwoton@gmail.com>
On 07/15, Topi Miettinen wrote:
>
> Track maximum size of locked memory, to be able to configure
> RLIMIT_MEMLOCK resource limits. The information is available
> with taskstats and cgroupstats netlink socket.
So I personally still dislike the very idea of this series... but I won't
argue if you convince maintainers.
> @@ -2020,6 +2020,10 @@ static int acct_stack_growth(struct vm_area_struct *vma, unsigned long size, uns
> return -ENOMEM;
>
> update_resource_highwatermark(RLIMIT_STACK, actual_size);
> + if (vma->vm_flags & VM_LOCKED)
> + update_resource_highwatermark(RLIMIT_MEMLOCK,
> + (mm->locked_vm + grow) <<
> + PAGE_SHIFT);
Btw this is not right. The same for the previous patch which tracks
RLIMIT_STACK. The "current" task can debugger/etc.
Yes, yes, this just reminds that the whole rlimit logic in this path
is broken but still...
Oleg.
next prev parent reply other threads:[~2016-07-15 15:14 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 [this message]
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
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=20160715151408.GA32317@redhat.com \
--to=oleg@redhat.com \
--cc=aarcange@redhat.com \
--cc=acme@kernel.org \
--cc=agraf@suse.com \
--cc=akpm@linux-foundation.org \
--cc=alex.williamson@redhat.com \
--cc=alexander.shishkin@linux.intel.com \
--cc=aryabinin@virtuozzo.com \
--cc=ashutosh.dixit@intel.com \
--cc=ast@kernel.org \
--cc=benh@kernel.crashing.org \
--cc=benve@cisco.com \
--cc=dan.carpenter@oracle.com \
--cc=dave.hansen@linux.intel.com \
--cc=dennis.dalessandro@intel.com \
--cc=dgoodell@cisco.com \
--cc=dledford@redhat.com \
--cc=emunson@akamai.com \
--cc=fenghua.yu@intel.com \
--cc=gang.chen.5i5j@gmail.com \
--cc=gorcunov@openvz.org \
--cc=gregkh@linuxfoundation.org \
--cc=hal.rosenstock@gmail.com \
--cc=hughd@google.com \
--cc=jslaby@suse.cz \
--cc=kirill.shutemov@linux.intel.com \
--cc=klimov.linux@gmail.com \
--cc=koct9i@gmail.com \
--cc=kuleshovmail@gmail.com \
--cc=kvm-ppc@vger.kernel.org \
--cc=kvm@vger.kernel.org \
--cc=linux-ia64@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=linux-rdma@vger.kernel.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=mhocko@suse.com \
--cc=mike.marciniszyn@intel.com \
--cc=mingo@redhat.com \
--cc=mpe@ellerman.id.au \
--cc=netdev@vger.kernel.org \
--cc=paulus@samba.org \
--cc=pbonzini@redhat.com \
--cc=peterz@infradead.org \
--cc=rientjes@google.com \
--cc=rkrcmar@redhat.com \
--cc=sean.hefty@intel.com \
--cc=sudeep.dutt@intel.com \
--cc=tglx@linutronix.de \
--cc=toiwoton@gmail.com \
--cc=tony.luck@intel.com \
--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).