From mboxrd@z Thu Jan 1 00:00:00 1970 From: Greg Kroah-Hartman Subject: Re: [PATCH TTY] memcg: drop GFP_KERNEL_ACCOUNT use in tty_save_termios() Date: Tue, 27 Jul 2021 11:32:07 +0200 Message-ID: References: Mime-Version: 1.0 Return-path: DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1627378329; bh=5Ez4IXemr8M6FoN3lv3kTwfLMCVrpyMcVjl7PW1H/ls=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=XUPRPfJGcA1bM6D58QeUAcuHwuh4hTPgHONhJ4hMVTUbs4zthrO/+R1Nd/jGKB0GY cyW6nGQbFKuu0V+3K1AOOMTFOpLeu6W+2MVXw00LUiUBb8r6Hxo6sQ1//wCkA84Jbj H5qGKbffQbrfOnP6ID5NNBkygNmzIHPnOvEDEC/k= Content-Disposition: inline In-Reply-To: List-ID: Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: Vasily Averin Cc: Jiri Slaby , cgroups-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org On Tue, Jul 27, 2021 at 12:26:12PM +0300, Vasily Averin wrote: > Jiri Slaby pointed that termios are not saved for PTYs and for other > terminals used inside containers. Therefore accounting for saved > termios have near to zero impact in real life scenarios. > > Cc: Jiri Slaby > Fixes: 854dd8a572a0 ("memcg: enable accounting for tty-related objects") > Signed-off-by: Vasily Averin > --- > drivers/tty/tty_io.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/tty/tty_io.c b/drivers/tty/tty_io.c > index e787f6f..a6230b2 100644 > --- a/drivers/tty/tty_io.c > +++ b/drivers/tty/tty_io.c > @@ -1493,7 +1493,7 @@ void tty_save_termios(struct tty_struct *tty) > /* Stash the termios data */ > tp = tty->driver->termios[idx]; > if (tp == NULL) { > - tp = kmalloc(sizeof(*tp), GFP_KERNEL_ACCOUNT); > + tp = kmalloc(sizeof(*tp), GFP_KERNEL); > if (tp == NULL) > return; > tty->driver->termios[idx] = tp; > -- > 1.8.3.1 > I can just drop the original patch from my tree, it has not gone into my unmutable branch yet. thanks, greg k-h From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.5 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 61F74C4338F for ; Tue, 27 Jul 2021 09:32:12 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 477E460F90 for ; Tue, 27 Jul 2021 09:32:12 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236132AbhG0JcK (ORCPT ); Tue, 27 Jul 2021 05:32:10 -0400 Received: from mail.kernel.org ([198.145.29.99]:33238 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236125AbhG0JcJ (ORCPT ); Tue, 27 Jul 2021 05:32:09 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 6A30760E09; Tue, 27 Jul 2021 09:32:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1627378329; bh=5Ez4IXemr8M6FoN3lv3kTwfLMCVrpyMcVjl7PW1H/ls=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=XUPRPfJGcA1bM6D58QeUAcuHwuh4hTPgHONhJ4hMVTUbs4zthrO/+R1Nd/jGKB0GY cyW6nGQbFKuu0V+3K1AOOMTFOpLeu6W+2MVXw00LUiUBb8r6Hxo6sQ1//wCkA84Jbj H5qGKbffQbrfOnP6ID5NNBkygNmzIHPnOvEDEC/k= Date: Tue, 27 Jul 2021 11:32:07 +0200 From: Greg Kroah-Hartman To: Vasily Averin Cc: Jiri Slaby , cgroups@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH TTY] memcg: drop GFP_KERNEL_ACCOUNT use in tty_save_termios() Message-ID: References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Jul 27, 2021 at 12:26:12PM +0300, Vasily Averin wrote: > Jiri Slaby pointed that termios are not saved for PTYs and for other > terminals used inside containers. Therefore accounting for saved > termios have near to zero impact in real life scenarios. > > Cc: Jiri Slaby > Fixes: 854dd8a572a0 ("memcg: enable accounting for tty-related objects") > Signed-off-by: Vasily Averin > --- > drivers/tty/tty_io.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/tty/tty_io.c b/drivers/tty/tty_io.c > index e787f6f..a6230b2 100644 > --- a/drivers/tty/tty_io.c > +++ b/drivers/tty/tty_io.c > @@ -1493,7 +1493,7 @@ void tty_save_termios(struct tty_struct *tty) > /* Stash the termios data */ > tp = tty->driver->termios[idx]; > if (tp == NULL) { > - tp = kmalloc(sizeof(*tp), GFP_KERNEL_ACCOUNT); > + tp = kmalloc(sizeof(*tp), GFP_KERNEL); > if (tp == NULL) > return; > tty->driver->termios[idx] = tp; > -- > 1.8.3.1 > I can just drop the original patch from my tree, it has not gone into my unmutable branch yet. thanks, greg k-h