Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp1196296iog; Thu, 30 Jun 2022 19:58:48 -0700 (PDT) X-Google-Smtp-Source: AGRyM1u2kNOQsRBu+IUOJCSpZwDG1tOFFtYB16JcQaIO2oANGtBM2stRrJnkniIrx5ziezcgqDpl X-Received: by 2002:a63:34c7:0:b0:40c:ffbc:4faf with SMTP id b190-20020a6334c7000000b0040cffbc4fafmr10504593pga.577.1656644328406; Thu, 30 Jun 2022 19:58:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1656644328; cv=none; d=google.com; s=arc-20160816; b=MySYw7Ht8j6i+Iqs/AegbMQSfpue0pzEq/xhivjCwSC8E5j7b9mV+Ckmw2kgPt3Cvg lbkr/WUCMY1CNoVktsTL9KCNIZJsPXMF9l9xRf7x4bTTQuodSQgA2bRRi5fWuTOWtOMS 3JCZab1AUfHeIYXLXrSux+TyDuzhD4iJZV/jCEv08Rmb5Nrhl0xx82vviaLPi/bKeObe OEL1r4GqhyU2fe5IUHDQxDMrf7+XqyXQoT9dyD/P2KsxdJ0IB4jGGYTwKLZrk8Il/zSx b/f/C8feLhmNbbvQ4r1Pm1TAcvhU9oGOG04/dIqSGzfWsX3YdzLWBbcr+TefMWDF24Fc T0qA== 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-disposition:mime-version :references:message-id:subject:cc:to:from:dkim-signature:date; bh=pMVELDaA6mcFkDFllRvcL5kIjjxBxBLDIIVIdn97dz4=; b=sUSEITgwD6BKwT2/mk/CpFqREvsmJdzFQmbxVYc2zwzEqA/msynb9MemKX0v9zfc1R FAwKPUr0Z+zFhisupQBUFJVdaam97tM9VmrJ8zrmOX4wAW9rg+0Dr5hhM/jkvCqHUvE9 WY0zfU2T732A/tQZIWItw8TrvFs1rf6cIF4SNNbhp+tj/a8ERxaqCklltLxYqyWi2ZnV aS1EpaBFsDbN4HFihwYxHpGKpE0/MHT3WvkSUUcfunsvOB4y7QmLKqDy+L3vzeGE4fBa XoZOEHQhZOjFfv/CdZBofmvHZ0qq3MXxmieEqiAG0CImZwKbNYCBhHbLfP6FtZRYrs/f F4Aw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=Scqzngmd; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.dev Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id e18-20020a656792000000b003fd55602efasi1690337pgr.362.2022.06.30.19.58.35; Thu, 30 Jun 2022 19:58:48 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=Scqzngmd; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.dev Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233468AbiGACmv (ORCPT + 99 others); Thu, 30 Jun 2022 22:42:51 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40214 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232992AbiGACmq (ORCPT ); Thu, 30 Jun 2022 22:42:46 -0400 Received: from out0.migadu.com (out0.migadu.com [IPv6:2001:41d0:2:267::]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4E24564D40; Thu, 30 Jun 2022 19:42:45 -0700 (PDT) Date: Thu, 30 Jun 2022 19:42:36 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1656643363; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=pMVELDaA6mcFkDFllRvcL5kIjjxBxBLDIIVIdn97dz4=; b=ScqzngmdlUq8J5Kb06lReoG/MwkkI6G9TVrCHdbC9i++IBDL2+fN7P+gZPFs/0Aa3bwAEV 9JXjkrAUBwXK9420gleAL8BwrOwUBFv/kCkXYGmdNCcrCntT4HZ4jvss0snDNRQiPEl8Nt sPZblsUlzi7M3IVALotR9AO/mF5Db1E= X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Roman Gushchin To: Tejun Heo Cc: Vasily Averin , Michal =?iso-8859-1?Q?Koutn=FD?= , Shakeel Butt , Michal Hocko , Zefan Li , Johannes Weiner , kernel@openvz.org, linux-kernel@vger.kernel.org, Andrew Morton , linux-mm@kvack.org, Vlastimil Babka , Muchun Song , cgroups@vger.kernel.org Subject: Re: [PATCH cgroup] cgroup: set the correct return code if hierarchy limits are reached Message-ID: References: <186d5b5b-a082-3814-9963-bf57dfe08511@openvz.org> <17916824-ba97-68ba-8166-9402d5f4440c@openvz.org> <20220628091648.GA12249@blackbody.suse.cz> <525a3eea-8431-64ad-e464-5503f3297722@openvz.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Migadu-Flow: FLOW_OUT X-Migadu-Auth-User: linux.dev X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW,SPF_HELO_PASS, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Jun 30, 2022 at 04:25:57AM +0900, Tejun Heo wrote: > On Wed, Jun 29, 2022 at 09:13:02AM +0300, Vasily Averin wrote: > > I experimented on fedora36 node with LXC and centos stream 9 container. > > and I did not noticed any critical systemd troubles with original -EAGAIN. > > When cgroup's limit is reached systemd cannot start new services, > > for example lxc-attach generates following output: > > > > [root@fc34-vvs ~]# lxc-attach c9s > > lxc-attach: c9s: cgroups/cgfsng.c: cgroup_attach_leaf: 2084 Resource temporarily unavailable - Failed to create leaf cgroup ".lxc" > > lxc-attach: c9s: cgroups/cgfsng.c: __cgroup_attach_many: 3517 Resource temporarily unavailable - Failed to attach to cgroup fd 11 > > lxc-attach: c9s: attach.c: lxc_attach: 1679 Resource temporarily unavailable - Failed to attach cgroup > > lxc-attach: c9s: attach.c: do_attach: 1237 No data available - Failed to receive lsm label fd > > lxc-attach: c9s: attach.c: do_attach: 1375 Failed to attach to container > > > > I did not found any loop in userspace caused by EAGAIN. > > Messages looks unclear, however situation with the patched kernel is not much better: > > > > [root@fc34-vvs ~]# lxc-attach c9s > > lxc-attach: c9s: cgroups/cgfsng.c: cgroup_attach_leaf: 2084 No space left on device - Failed to create leaf cgroup ".lxc" > > lxc-attach: c9s: cgroups/cgfsng.c: __cgroup_attach_many: 3517 No space left on device - Failed to attach to cgroup fd 11 > > lxc-attach: c9s: attach.c: lxc_attach: 1679 No space left on device - Failed to attach cgroup > > lxc-attach: c9s: attach.c: do_attach: 1237 No data available - Failed to receive lsm label fd > > lxc-attach: c9s: attach.c: do_attach: 1375 Failed to attach to container > > I'd say "resource temporarily unavailable" is better fitting than "no > space left on device" +1 Thanks!