Received: by 2002:a05:6a11:4021:0:0:0:0 with SMTP id ky33csp733285pxb; Tue, 14 Sep 2021 07:37:24 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxWmlCUguHTWmSnPsFvu8OBVITQzjGexLcKSxy+7vQg8SgAKZkkiyTVCA+HcWVOBwe1qd9l X-Received: by 2002:a17:906:f88a:: with SMTP id lg10mr3077584ejb.13.1631630244445; Tue, 14 Sep 2021 07:37:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1631630244; cv=none; d=google.com; s=arc-20160816; b=ou0uqNZYkjhrDCDu+ubwOrKP6Y/zooME2J+wWmGZIMtEBuuJSm/hc4WOIvdwem3bXR T9E+leDwd/8lV4XsMp3L3CSEMFNNIudgMEh7jKz+cQW+wDc+Cfv4a0YUODtcywprBqrb +3ZFtYSn3N9HqH4EnXWd11jiUkYLXyjl9QrrHOJGjHq/mv0ZAXr9fCv7KBuC4VaipkKR RTD9fwphI648ow6f96uf4B1L4o0FiYsXQV0bY1HqndITnEzj9jMJIaRkiXJv6alazMdz +Eq5nizk6B87oHmX2yOuJlFVRPjO9ngCEVE8k0dW+VydF65gg/HFK5RPld05FewqkML+ rHKQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=H8cl6i/Xuxe8x3+G+xdschhZeDxTx8TVhW/IfLYXe8g=; b=hMn3Cpgr0h7A5l3zIVKIz9920dHvloz6+TnfSz7EbYRQpFvgIQuXr0VB1CQm5IzvrA 6Yymj8WWtzdsX41DBQYM6o5suNqRMO8qYiBObhPDtpF9Vi6BH3gdzlCQW+/40OHewKpK xtthB+5+X0DZ+07DDp/1RfQjFt5TwJlzs8TDl6vgNrBPx8zo9RuuSnqE0YbedyVKEHH6 5Ggott12kBSBZETTMcqFg+dURlcxkqmk7R/8NbWJJRalYrbl6oTHY3uvZY5OIp6MaTiv 8Wgq3AC6tQbYkdz8yKwY528yqlLPr7lPFKV3k9Baq9HThwMh8MVlXzSTTp4aXQnj8GQO SENA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.com header.s=susede1 header.b="ic/UhyEZ"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=suse.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id c19si11663528ejj.206.2021.09.14.07.36.59; Tue, 14 Sep 2021 07:37:24 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@suse.com header.s=susede1 header.b="ic/UhyEZ"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=suse.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233794AbhINOdk (ORCPT + 99 others); Tue, 14 Sep 2021 10:33:40 -0400 Received: from smtp-out1.suse.de ([195.135.220.28]:58200 "EHLO smtp-out1.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233780AbhINOdj (ORCPT ); Tue, 14 Sep 2021 10:33:39 -0400 Received: from relay2.suse.de (relay2.suse.de [149.44.160.134]) by smtp-out1.suse.de (Postfix) with ESMTP id A6C1822100; Tue, 14 Sep 2021 14:32:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1631629940; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=H8cl6i/Xuxe8x3+G+xdschhZeDxTx8TVhW/IfLYXe8g=; b=ic/UhyEZIPK10iNW01IYfzvu+rOZxxQP19bKkTCbeUetDCBq7x25/tljIRbq7E9Xf9yWGs s1bw70mn5grnjbE5rrWFcN1ivU/qIVXWNtsGAW1jnxtmK4IQ+JdSTcoHnFf1puZhFpQT/B Uv5QTCrnI+Y9RByFJ7YrBZRk/5q8nU4= Received: from suse.cz (unknown [10.100.201.86]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by relay2.suse.de (Postfix) with ESMTPS id 7AAB1A3B9F; Tue, 14 Sep 2021 14:32:20 +0000 (UTC) Date: Tue, 14 Sep 2021 16:32:20 +0200 From: Michal Hocko To: Michal =?iso-8859-1?Q?Koutn=FD?= Cc: Shakeel Butt , Vasily Averin , Andrew Morton , Linus Torvalds , LKML , Johannes Weiner , kernel@openvz.org, Cgroups Subject: Re: [PATCH] ipc: remove memcg accounting for sops objects in do_semtimedop() Message-ID: References: <90e254df-0dfe-f080-011e-b7c53ee7fd20@virtuozzo.com> <20210914142316.GA23024@blackbody.suse.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20210914142316.GA23024@blackbody.suse.cz> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue 14-09-21 16:23:16, Michal Koutny wrote: > On Tue, Sep 14, 2021 at 09:13:48AM +0200, Michal Hocko wrote: > > " > > This object can consume up to 2 pages, syscall is sleeping one, > > size and duration can be controlled by user, and this allocation > > can be repeated by many thread at the same time. > > " > > > > It sounds like a problem, except it is not because? A worst case > > scenario evaluation would be beneficial for example > > AFAICS, the offending allocation is in place only during the duration of > the syscall. So it's basically O(#tasks). > Considering at least 2 pages for task_struct + 2 pages for kernel stack, > back of the envelope calculation gives me the footprint amplification is > <1.5. > The factor would IMO be interesting if it was >> 2 (from the PoV of > excessive (ab)use, fine-grained accounting seems to be currently > unfeasible due to performance impact). Yes this sounds exactly like something I would appreciate in the changelog. With that or similar feel free to add Acked-by: Michal Hocko Thanks a lot Michal for this clarification! > The commit message can be more explicit about this but to the patch > Reviewed-by: Michal Koutn? -- Michal Hocko SUSE Labs