Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp296192iog; Tue, 28 Jun 2022 23:42:56 -0700 (PDT) X-Google-Smtp-Source: AGRyM1ulN/IqeMcJ/sRcnoVlsxLO4CPUNZTHqbSotvHDCaU0EsvLTGdX7FALLRUTXmYk+sbYZuOh X-Received: by 2002:a17:906:b01a:b0:718:cc50:4c6 with SMTP id v26-20020a170906b01a00b00718cc5004c6mr1698845ejy.630.1656484976440; Tue, 28 Jun 2022 23:42:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1656484976; cv=none; d=google.com; s=arc-20160816; b=gOnNlW7Gd7e+brDJghj6xqxOij4bb7KOSNd8fqojxnRfVrxxt5h5Y1zljIsoKfWlC1 J7AceMW14t5M/b9D/JbHQxa5u44V7DVZQ7XRpCKlalXsMX3SjZuUH6pl1AnjDZp2YnqP u/4nQqpz0x9Nwh0VB0i0iA9WRPsdBeX/nFq5sDVsm1ao56nAx52NhX/7fkAMBC7cMI8k 6urcHwS0trUgfRcaJqac1PU9OJgatlb69lsCqeR2hZfJOeIywvC7m3OO4Y4s9KcW11RG lDaMgo7KBFKQvjuCNgjH+BSEzIMUd0pR4gJ0SizxGboTwvaH+7nTNJiIcZ9vbvh1KrU2 7POg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=tXBEMcYdLbL7j0CBnFEQrI7j8CDRw/szwLk4z5HVwIU=; b=PcYS8rkx2Vl38ty8kV0DNcNFxI07z54FX8QdmdwtEWmakjcxaI6a1rkQQWMc/RwZ4Y 4sIUTMIGyBCszwSP1C3os+UkR6mGMV0Z+vLq6yY443kzEkx9gN08EIlHzwRePnGFT0ZF jWBGv/usMgHGYMG/1x0I+CG3D0r1ZbbY3FMOtUzOvXoWYkYwI9ymtmrzRjRLaT5eLaM6 Xwk6GLXqjXWlQnEUvQGB9naYUXSDJ4bF+YOpTu4Zc25VvJHEwkK2MxWuyXVM4BPFCQsk i7+2/WQXjGvogqI3VJI6NSqCOyiBnG7V/1xc4N0aZxS9WVhAMJCSuTaX4cJiTLrZfGzH Mp7Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@openvz-org.20210112.gappssmtp.com header.s=20210112 header.b=6xIoLTbT; 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=fail (p=NONE sp=NONE dis=NONE) header.from=openvz.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id gb19-20020a170907961300b0070d5a5343a3si17084736ejc.353.2022.06.28.23.42.31; Tue, 28 Jun 2022 23:42:56 -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=@openvz-org.20210112.gappssmtp.com header.s=20210112 header.b=6xIoLTbT; 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=fail (p=NONE sp=NONE dis=NONE) header.from=openvz.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231865AbiF2GNL (ORCPT + 99 others); Wed, 29 Jun 2022 02:13:11 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53664 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231778AbiF2GNH (ORCPT ); Wed, 29 Jun 2022 02:13:07 -0400 Received: from mail-lj1-x230.google.com (mail-lj1-x230.google.com [IPv6:2a00:1450:4864:20::230]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 01CD1B92 for ; Tue, 28 Jun 2022 23:13:06 -0700 (PDT) Received: by mail-lj1-x230.google.com with SMTP id a11so17596273ljb.5 for ; Tue, 28 Jun 2022 23:13:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=openvz-org.20210112.gappssmtp.com; s=20210112; h=message-id:date:mime-version:user-agent:subject:content-language:to :cc:references:from:in-reply-to:content-transfer-encoding; bh=tXBEMcYdLbL7j0CBnFEQrI7j8CDRw/szwLk4z5HVwIU=; b=6xIoLTbTENo5N5hHKjhjfiPk6YpVnyqcLFcwoVzvW3j8d4aWTu8RxffBad1YuW22ZQ B7JUZzvMlY3hMEVofUyVtHBYlj7NYSiQSjSmRtHMHwYaGzHsaqvwDqH4SBVu0eg2wt1p 09spkd8NH3luZDqG7H3iAwgS+g1MUQ3GRFz+F1gyrPFJjm6z7aaVcn7gc2MOrFB/p6kF JajynDxOhztcu9FGmfWos5JDk1HGKQ0g4bqDoY+ExizDNO0aXZPzeg0b1uGZ74fHWMX+ +J+20MEXlTNZIPQhPd4BwwqzofH2gf1h83iJVr7esOJIGCDxJ6fleBsVho2LMH/DFy0V agWA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:date:mime-version:user-agent:subject :content-language:to:cc:references:from:in-reply-to :content-transfer-encoding; bh=tXBEMcYdLbL7j0CBnFEQrI7j8CDRw/szwLk4z5HVwIU=; b=UuVjeLCNr1Vpj0ybloTVN6tHpKTi6sDnvilrtH30nmVRH5Vs1a2H0brV0oeJJ9zIrN 1p6gZxYy8mM4M9myPSeBHFNjsZX+bDHijDhHhlrhJolewS4qwkkNHflI30Vn/Xl0ZzYS 9m8XrHEzftQuJ+22NeRfsvgF/vu5yJLD23zoxWfbWJyjHfy2odqRtRsQF4NmpqViWhcp jKO9mgRiNgN0P72OBivLSjUoZDTUi+eIqmH7orBCbsAHRlubA8EG00nzr7EcaMpIYoI9 PfyNW0sOwc+58DHInXwnToQOaUmipj6OIvP4zWGDWai7t4c1r0N58zydBd7UY2wQmB07 E+DQ== X-Gm-Message-State: AJIora9gbvx9YkfIdW2SIhORoVscudJZ2CBQFb9ekzguvHH2qSiAQeYI 8rAUEImwhJZRIbXGoIs+fde3ig== X-Received: by 2002:a2e:a707:0:b0:25a:7709:d8ce with SMTP id s7-20020a2ea707000000b0025a7709d8cemr849124lje.362.1656483184254; Tue, 28 Jun 2022 23:13:04 -0700 (PDT) Received: from [192.168.1.65] ([46.188.121.129]) by smtp.gmail.com with ESMTPSA id z9-20020a0565120c0900b0047f66471224sm2475170lfu.222.2022.06.28.23.13.02 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 28 Jun 2022 23:13:03 -0700 (PDT) Message-ID: <525a3eea-8431-64ad-e464-5503f3297722@openvz.org> Date: Wed, 29 Jun 2022 09:13:02 +0300 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.9.1 Subject: Re: [PATCH cgroup] cgroup: set the correct return code if hierarchy limits are reached Content-Language: en-US To: Tejun Heo , =?UTF-8?Q?Michal_Koutn=c3=bd?= Cc: 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 References: <186d5b5b-a082-3814-9963-bf57dfe08511@openvz.org> <17916824-ba97-68ba-8166-9402d5f4440c@openvz.org> <20220628091648.GA12249@blackbody.suse.cz> From: Vasily Averin In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,NICE_REPLY_A,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,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 6/28/22 12:22, Tejun Heo wrote: > On Tue, Jun 28, 2022 at 11:16:48AM +0200, Michal Koutný wrote: >> The mkdir(2) manpage doesn't list EAGAIN at all. ENOSPC makes better >> sense here. (And I suspect the dependency on this particular value won't >> be very wide spread.) > > Given how we use these system calls as triggers for random kernel > operations, I don't think adhering to posix standard is necessary or > possible. Using an error code which isn't listed in the man page isn't > particularly high in the list of discrepancies. > > Again, I'm not against changing it but I'd like to see better > rationales. On one side, we have "it's been this way for a long time > and there's nothing particularly broken about it". I'm not sure the > arguments we have for the other side is strong enough yet. I would like to recall this patch. 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 Thank you, Vasily Averin