From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 0C9A71A4AAB for ; Fri, 30 Aug 2024 12:57:56 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1725022677; cv=none; b=AouV50mWXqLXw5/ZPc9XlpyD7B64rdPlkkjQ6UvywpLJLfNJ6DUb4WzLLwez/rqgNi2w4zntu0uVQr47EgVFwnYYZBkVhqiYmc6PiiTUpkSIleoqC29eIEyjguMY2CRhzJT8t8xuo/KQFt1cunPr1uFGccAeKVuQQEy8qSQ7pOc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1725022677; c=relaxed/simple; bh=hzYUKPnQpeOsiMqZsdUmep7w0hKLktC/oDRe3ZuQDb0=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=ZRX0aUIDCaHE+q7kxqcWemZIm7FeOxAvJ32sG+nyNvgXiRI+IKrqgGo6ws8IgvWoBV/De/vpw8IMrRHjN2UiPWIaTL2VYfuN4Z0ZKvGX5hilzLVOap4PRxEshC/L1YdNhIFc9DjP+ph7ZfjANaRHomoxoM5uYVx11pfivtmoh1c= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=PHuhUt0P; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="PHuhUt0P" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 0A6A0C4CEC7; Fri, 30 Aug 2024 12:57:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1725022676; bh=hzYUKPnQpeOsiMqZsdUmep7w0hKLktC/oDRe3ZuQDb0=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=PHuhUt0PTH5ACfBdB9lqjkLXy4pQ5JhjsxaUftCaNdjStzvKxP0HnJoNiwGTyhNv4 HZxgHbSh0L8IuULW04yTFANBry43ajsbKbeBfGeMGUgvMxjONlwP5YvS36MdgxtPok Xji+TJrcQWNRmIXo8P/0jS/Xg0mmgTRUu8PRSe/Q= Date: Fri, 30 Aug 2024 14:57:53 +0200 From: Greg Kroah-Hartman To: hsimeliere.opensource@witekio.com Cc: stable@vger.kernel.org, Vasily Averin , Shakeel Butt , Alexander Viro , Alexey Dobriyan , Andrei Vagin , Borislav Petkov , Borislav Petkov , Christian Brauner , Dmitry Safonov <0x7f454c46@gmail.com>, "Eric W. Biederman" , "H. Peter Anvin" , Ingo Molnar , "J. Bruce Fields" , Jeff Layton , Jens Axboe , Jiri Slaby , Johannes Weiner , Kirill Tkhai , Michal Hocko , Oleg Nesterov , Roman Gushchin , Serge Hallyn , Tejun Heo , Thomas Gleixner , Vladimir Davydov , Yutian Yang , Zefan Li , Andrew Morton , Linus Torvalds Subject: Re: [PATCH 4.19 1/1] memcg: enable accounting of ipc resources Message-ID: <2024083045-ecologist-shrank-c2c9@gregkh> References: <20240830082045.24405-1-hsimeliere.opensource@witekio.com> <20240830082045.24405-2-hsimeliere.opensource@witekio.com> Precedence: bulk X-Mailing-List: stable@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20240830082045.24405-2-hsimeliere.opensource@witekio.com> On Fri, Aug 30, 2024 at 10:20:28AM +0200, hsimeliere.opensource@witekio.com wrote: > From: Vasily Averin > > commit 18319498fdd4cdf8c1c2c48cd432863b1f915d6f upstream. > > When user creates IPC objects it forces kernel to allocate memory for > these long-living objects. > > It makes sense to account them to restrict the host's memory consumption > from inside the memcg-limited container. > > This patch enables accounting for IPC shared memory segments, messages > semaphores and semaphore's undo lists. > > Link: https://lkml.kernel.org/r/d6507b06-4df6-78f8-6c54-3ae86e3b5339@virtuozzo.com > Signed-off-by: Vasily Averin > Reviewed-by: Shakeel Butt > Cc: Alexander Viro > Cc: Alexey Dobriyan > Cc: Andrei Vagin > Cc: Borislav Petkov > Cc: Borislav Petkov > Cc: Christian Brauner > Cc: Dmitry Safonov <0x7f454c46@gmail.com> > Cc: "Eric W. Biederman" > Cc: Greg Kroah-Hartman > Cc: "H. Peter Anvin" > Cc: Ingo Molnar > Cc: "J. Bruce Fields" > Cc: Jeff Layton > Cc: Jens Axboe > Cc: Jiri Slaby > Cc: Johannes Weiner > Cc: Kirill Tkhai > Cc: Michal Hocko > Cc: Oleg Nesterov > Cc: Roman Gushchin > Cc: Serge Hallyn > Cc: Tejun Heo > Cc: Thomas Gleixner > Cc: Vladimir Davydov > Cc: Yutian Yang > Cc: Zefan Li > Signed-off-by: Andrew Morton > Signed-off-by: Linus Torvalds > Signed-off-by: Hugo SIMELIERE > --- > ipc/msg.c | 2 +- > ipc/sem.c | 10 ++++++---- > ipc/shm.c | 2 +- > 3 files changed, 8 insertions(+), 6 deletions(-) > Now queued up, thanks. greg k-h