Received: by 2002:a05:6a10:eb17:0:0:0:0 with SMTP id hx23csp671315pxb; Wed, 8 Sep 2021 09:38:09 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz7qQEKld5tIJVIKDybHrB+nnP6qWLclqDnfk/AdLeJBYOkB1t1VYJ09nplWV3s17etz96h X-Received: by 2002:a17:906:2c07:: with SMTP id e7mr779486ejh.87.1631119089590; Wed, 08 Sep 2021 09:38:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1631119089; cv=none; d=google.com; s=arc-20160816; b=uIUWB7JMEN4vGlCoTjTXr7UoJ12KCzRV3NS+pTjq7XhDPXXlgOnMB15j7iO3SfzkWz bmbHXw9ywU9RgigDYZAziPfT8B8YLvg8NMzG6KxIZDWVTOar+Pb3+zDJCQpuiMMgNGgI lfpw6cYp3epgxnZbQ0j1mNYsFPr6aMxYZX0TI274NSohPnUKRCDM65uooTn1BDu6lSV2 yvwCm9i7A4yzuKDSdpx90xj+UR0buksdsN2DYLUKmWmWYV0E71HDwR+FI5eT7vmLBEHO HrdIhXEJLuzl7I9rgRnkOqaDkohRZrMPMx+Ktw79x9Xs8J2XmONcwnffUsB8w6HNrXdD dpPw== 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=OcymaPtn2yQq8RdWF6BFH20bMyFtxjOxZMFIB1OMhb4=; b=xfkREBmzAs18/4FqwZFN3JaAllFXEs/Zel9JzPZFLTtkRueNsFIux6ovmHTPsCHz6r z9RSDej/6YlsHRDIvtkRgLlv/kJfYAO8//BQBo+HWEA9v7ByTZUGbBzIDC8uO4VrQ5E2 63haoDuIZZBBCKq9bGXlZGvdMJ0lo3FEHycjojtagt59ddXZbjjmYRD5QzOUdy8aF1tW fKEeBm8cdp0a6mbnCgXYX6Kj284NyqeBBVK/U2uWEUVC1zhLo2J0emSCrKaSZ8ldvJKw tzdG9pfDJBVRt96k7ErnAFebP1TFnX/W7IaPIw4gpTGbcwE3WN+dOmEB0llQP8HY2OND vjnw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b="cEO/E0Ry"; 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=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id eg14si901374edb.507.2021.09.08.09.37.32; Wed, 08 Sep 2021 09:38:09 -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=@gmail.com header.s=20210112 header.b="cEO/E0Ry"; 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=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1349245AbhIHQgW (ORCPT + 99 others); Wed, 8 Sep 2021 12:36:22 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60652 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1343833AbhIHQgV (ORCPT ); Wed, 8 Sep 2021 12:36:21 -0400 Received: from mail-pj1-x102d.google.com (mail-pj1-x102d.google.com [IPv6:2607:f8b0:4864:20::102d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 80493C061575; Wed, 8 Sep 2021 09:35:13 -0700 (PDT) Received: by mail-pj1-x102d.google.com with SMTP id pi15-20020a17090b1e4f00b00197449fc059so1591888pjb.0; Wed, 08 Sep 2021 09:35:13 -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=OcymaPtn2yQq8RdWF6BFH20bMyFtxjOxZMFIB1OMhb4=; b=cEO/E0Ry4JDv4NAoZWlVwP4k205lyAd9w0Jc/1E0rCsSXw3qxpjooAnEo5b0LiZ/xh 1cmfhhXIkymzyYy74CxqfFRkcGkxEeqgtwbcmUmMOkNEgfNyZNECXRyYhdC3TWU3C1wr RYo72dsDHQjeUlpJ7ZxqIgnRC0i4WwnJja8UvQ7EAgxQKkXrN4eymCpiHcJPG6g0QGA8 1fdL5abIwfzLj6FxUwYFP5fiwW7rZUSkCJFGZOaOTXRaWkmRkbrJ+7uEWs7JEQ0dy4ji /jGHumraXj/+ujT5+g4BougNm+Fbf7wvpHnEOR+SoWoel7IC/QoSVu1xTlgMd7VHAL2l 7/XA== 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=OcymaPtn2yQq8RdWF6BFH20bMyFtxjOxZMFIB1OMhb4=; b=lEId6/rcLwTgnpWKqEg+WWPDN/ctdwXKdvLofL2WZSubx8jnak5nxV5DU2yO5RQnKO qpmUPT0WLxVQ1EWXbzgn2zuRvtnRQnhOqpyoc7jDreihuHmUeOsQiixAONZC4tCsdXIA 5r27ePBJ3T1hWxetihS6Oka+FZUHv71rSEqmBJcWJ1ARES2Ee4XleezTfM1tNbfQXUuR Qj/ERb1x8FZfGHcqRILWq5LTCuFW9wdAIKgqEv7E5y07nsAK6ZpYQLOorYVUMQrurzgR if9QbwVYq2j06DYISF78fr43v7UsnNXUHaky7nBjVT6Ed+GFj60gmQATp4uHZjdmnySm WJdw== X-Gm-Message-State: AOAM533xLShQSj71FDIqSQzXtRM6pUGdr6z3maxkAtxzAdzQBVtLXfT2 AXGdgmAC5iel5pqDrgGCNohMVqvWAWg= X-Received: by 2002:a17:90a:e009:: with SMTP id u9mr5000361pjy.218.1631118912916; Wed, 08 Sep 2021 09:35:12 -0700 (PDT) Received: from localhost (2603-800c-1a02-1bae-e24f-43ff-fee6-449f.res6.spectrum.com. [2603:800c:1a02:1bae:e24f:43ff:fee6:449f]) by smtp.gmail.com with ESMTPSA id q20sm3798099pgu.31.2021.09.08.09.35.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 08 Sep 2021 09:35:12 -0700 (PDT) Sender: Tejun Heo Date: Wed, 8 Sep 2021 06:35:11 -1000 From: Tejun Heo To: Yi Tao Cc: gregkh@linuxfoundation.org, lizefan.x@bytedance.com, hannes@cmpxchg.org, mcgrof@kernel.org, keescook@chromium.org, yzaikin@google.com, linux-kernel@vger.kernel.org, cgroups@vger.kernel.org, linux-fsdevel@vger.kernel.org, shanpeic@linux.alibaba.com Subject: Re: [RFC PATCH 0/2] support cgroup pool in v1 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 Hello, On Wed, Sep 08, 2021 at 08:15:11PM +0800, Yi Tao wrote: > In order to solve this long-tail delay problem, we designed a cgroup > pool. The cgroup pool will create a certain number of cgroups in advance. > When a user creates a cgroup through the mkdir system call, a clean cgroup > can be quickly obtained from the pool. Cgroup pool draws on the idea of > cgroup rename. By creating pool and rename in advance, it reduces the > critical area of cgroup creation, and uses a spinlock different from > cgroup_mutex, which reduces scheduling overhead on the one hand, and eases > competition with attaching processes on the other hand. I'm not sure this is the right way to go about it. There are more conventional ways to improve scalability - making locking more granular and hunting down specific operations which take long time. I don't think cgroup management operations need the level of scalability which requires front caching. Thanks. -- tejun