Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp913574iog; Wed, 29 Jun 2022 12:51:22 -0700 (PDT) X-Google-Smtp-Source: AGRyM1tnXZPHhx8IhYlLcpD0yQcBZQP/EbK3S2xLvC6tp2jm09TAJZpsDvl4cQRCAy2yyVTKNci7 X-Received: by 2002:a63:f24d:0:b0:40d:ed5f:1729 with SMTP id d13-20020a63f24d000000b0040ded5f1729mr4296194pgk.338.1656532282285; Wed, 29 Jun 2022 12:51:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1656532282; cv=none; d=google.com; s=arc-20160816; b=qKhLk5bNd77GvfKocpJJPjr2wJ0qpF9vZ2ADf7lZJuVJ/L1LRolXliQ4F8v8hmMO+l lmoYu9B2B5j5eTJ9gnCCvqt1XYWnpv0+7wwfeK8KCrXGJKtjjuGwUL6CZdMa9WweYH2w q9Ekw1agR6t74C6kdfH6Ycx1xYg+yl1vzK6sUNzzoNiDob4gd7Jm0RG6THPbjXl7J73q J1Sp3DFHANKoDF8hD1LhpFJLyakcFhohorONRSsBIblDI4/79cqyQUqHinvUFwMl7k2k pkzbLAVF4tVWPegwx2+NHMc3UT8MXzWvvKfw4kz6FyQH8fgFK1HfkbfHBX2ViSfS5SMO xChg== 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:date:sender:dkim-signature; bh=FOvU7kkY3061/Y6ML2riqvq9E9PyjzheNXe1X2hbYKw=; b=ZDNOM2pBfR2TSxiD1rjT4+eM1OdPua1GHopia0LnxC80TQV8FqkpqlpCX4kiszmeGf LFfMBNiu6yLldQUC9BzJlQdtEHl6Urje76HBXaAdwV0NbrJpmjF+SRL8vOk6Je68mpsL NWMUDqbczPXj/wDV8Ie9db5966CUBRuk2prvjxRRPhfMKPflsIJsjudRNquOeU/4kU7J uk65QWmsBrZaKooIs1/zpbVI5t/aKopmZyq69kUiVXGalVaxQpA3hsyGTLcKoYCgKRmD /JX1Hr+H393zzFLd1Ol6ga7C8dbg3MCemos2xjBSIWkHZfBG3Ype7XE4gnut9lxh7Y21 800w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=V9dUu8Wt; 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=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id j71-20020a63804a000000b0040dd28f9670si17364661pgd.603.2022.06.29.12.51.09; Wed, 29 Jun 2022 12:51:22 -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=@gmail.com header.s=20210112 header.b=V9dUu8Wt; 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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230263AbiF2T0E (ORCPT + 99 others); Wed, 29 Jun 2022 15:26:04 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37610 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229975AbiF2T0B (ORCPT ); Wed, 29 Jun 2022 15:26:01 -0400 Received: from mail-pf1-x430.google.com (mail-pf1-x430.google.com [IPv6:2607:f8b0:4864:20::430]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E4CC9393F4; Wed, 29 Jun 2022 12:26:00 -0700 (PDT) Received: by mail-pf1-x430.google.com with SMTP id n12so16074538pfq.0; Wed, 29 Jun 2022 12:26:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=FOvU7kkY3061/Y6ML2riqvq9E9PyjzheNXe1X2hbYKw=; b=V9dUu8WtJeBE8oGYB7nq+4RFkzp3O7qiE28jpnaaEt3/FzsvCqubr9YdtYM6mODSY8 dIUJluVOX75DHnavuyZ+/jgaLm4g8f4cYXnC8EMbWW/f54M1wsTwqtBLsQZzSnDQjQhu 4fCs36fLopglf6HJXBUSbNnZPK18HlPzMa/J/sN4owOeqydod23RerxcOZIP5cpVTjWP 77ukE+oErNdhKUIj9uRPop6ewX/GaseO3pgjt7dRfQIhgFu9YBcvdOrA0AW4z9yXjnTl +bpTkGSPWzroB99J7apjT2zvpSRe4o81bpRqoo1JMcNLcnp8Ou1XO/++4YqaIB3s0AfA DJ+A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:sender:date:from:to:cc:subject:message-id :references:mime-version:content-disposition:in-reply-to; bh=FOvU7kkY3061/Y6ML2riqvq9E9PyjzheNXe1X2hbYKw=; b=deyC3/FXV0DNoltGsny951WiukZAWXp7PPW1pCGyWqowkJINc7+UjuLrtqmoq5UF+s e8fQq1YMnvOJFzAKX/nV2pFdbLxXjS9WRJF1qZuvC/a2r22+GFZreYvyBCBpTEHxdZTy yArS3CkBDZQ+H1HV7r8fvGFXss3km4P5/rvMhHmhZxGwPTwnyNG6Jkep8VFNjVzYV6sL sXnJ6gWYv9B9+DfYEs3aLSU0zZ9bteblLIf+vpOzucA0y0XCA4b3UWayFxAoiCEDZM8d yawZbhZKGgtLr35g2dLrNvL0168IOOA2coA/PQOq5TQzVbC2z4/+5z5dJIVEq5duVuP7 SXIA== X-Gm-Message-State: AJIora/qRhD5UyPOCaySVfWvKb0/h5kBs7vtr37gWnPGSWT8QvFlHB4C ii4vQOIi3kfS28EqvE/r5SM= X-Received: by 2002:a63:5203:0:b0:40d:bf0c:d123 with SMTP id g3-20020a635203000000b0040dbf0cd123mr4133227pgb.287.1656530760072; Wed, 29 Jun 2022 12:26:00 -0700 (PDT) Received: from localhost ([121.167.227.144]) by smtp.gmail.com with ESMTPSA id 9-20020a17090a0a8900b001eee5416138sm2566952pjw.52.2022.06.29.12.25.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 29 Jun 2022 12:25:59 -0700 (PDT) Sender: Tejun Heo Date: Thu, 30 Jun 2022 04:25:57 +0900 From: Tejun Heo To: Vasily Averin Cc: Michal =?iso-8859-1?Q?Koutn=FD?= , Roman Gushchin , 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: <525a3eea-8431-64ad-e464-5503f3297722@openvz.org> X-Spam-Status: No, score=-1.5 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_EF,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=no 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 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" and the syscall restart thing isn't handled by -EAGAIN return value. Grep restart_block for that. Thanks. -- tejun