Received: by 2002:a05:6602:18e:0:0:0:0 with SMTP id m14csp5947207ioo; Wed, 1 Jun 2022 16:45:49 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz6GK3CNufllGXG6mGgfGH3qRM2pFHryWvePwcmDmJ9kBQ0qXMWDtvoj5IqHAQPy0fY49c5 X-Received: by 2002:a17:903:22ce:b0:164:277:88c6 with SMTP id y14-20020a17090322ce00b00164027788c6mr1963061plg.22.1654127149264; Wed, 01 Jun 2022 16:45:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1654127149; cv=none; d=google.com; s=arc-20160816; b=duY+rQamNowOMd6Ez+PYxszG/fMO+jc0NpPtSwM8buOALIrksV3+70RLrA68FsXabe LRzJeL9+ZIwXO42/ynVQbTJKQ3+WREqjyWm43oXv1VYJYZGy9BdJurL/nE2mmP4cLN0t gdy1laXiPt0lZnW2YMqahaDYaFmI1JvVe/bHzED7ZqD/rUiXF/9FCP+QIuQ6t/sjySEh zVi/bUF2XgJDyX+C7fL0Sw79/fBt2wblE9UiMbYZSQEHznz6vW7+Q6a0cMeXKMrMKXfV c3k3VvBXnXDTaILB6J2iOjOtcH91snmT2OXr3xLc/ygsHdaJroR9c3zhsRO0Hnbv2Y8P oWrA== 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=7PESzE8t9Lz5OlcxB//4LK+p9oMKSM6zcC2n6BmadAw=; b=jviESVbAb1X5gwDszXVycVkIbazRSmOzURrnIBwTb+MLKS5RDfohqwM6Jh+wWpsHBu Fye536xMc8nSp5rO28onq8R8IVvOkgtVPf3EwQ4PnCXo/ygnEeggL5lqh72Fc4rQWs0K KZOrblMPWmlztPy8i37xaWBlNXJ9bnYHYsRNXDaWjiV9fEMy0SNkcWnsSJ+tO4Fn++k9 MDTETmY/Y/+wW0n1Z24EL9lFALTeM2i70Cx76pkfZqXAGWRyL97WRYtkM69wGqMNypxt Yudq8tErAHKWvlThW4Pyj4m+2hfkt6BL6TLv4xr4CBrXcQGAhA5j/p0FSnYlIYGcjtlX S8+g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=jHJn4C6E; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1: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 lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id t11-20020a654b8b000000b003fae000dcb1si4071189pgq.246.2022.06.01.16.45.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 01 Jun 2022 16:45:49 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=jHJn4C6E; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1: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: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 2DC20393D6; Wed, 1 Jun 2022 16:43:24 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232591AbiFAXnP (ORCPT + 99 others); Wed, 1 Jun 2022 19:43:15 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33976 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232504AbiFAXnO (ORCPT ); Wed, 1 Jun 2022 19:43:14 -0400 Received: from mail-pf1-x42a.google.com (mail-pf1-x42a.google.com [IPv6:2607:f8b0:4864:20::42a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 79E05A189; Wed, 1 Jun 2022 16:43:13 -0700 (PDT) Received: by mail-pf1-x42a.google.com with SMTP id e11so3296308pfj.5; Wed, 01 Jun 2022 16:43: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=7PESzE8t9Lz5OlcxB//4LK+p9oMKSM6zcC2n6BmadAw=; b=jHJn4C6EiJHA/wfbqAQg3eI1uA1ryOPpUfynKm2uBWrty9D4XBUkhXQsUOCu8Ikhwu iVYsfkSi/+o3cLOVcI5ZyKmBF7MxnXoGXarYCVp0tjZJi+p1jPoO32tClD0Br+10qT/l MNzpDLGps7NWAom3zY3tMYa+qyWKS8pf0lMnNEwwTFZrO/rFkAxMbpaeTR7OmACjNSB1 IFDWyE6bhFvYaHyil6X1QfkkFo4k5n87TeCTA2uIf/Noxk1bQtApnZbci3+E7v58fL0m 8Yec0B87XoSKOGKUALuX/BcsiU/15e/J7BvPuB7UjnR0Xxvk2nsD1fomvrZh21l6114g Wy1Q== 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=7PESzE8t9Lz5OlcxB//4LK+p9oMKSM6zcC2n6BmadAw=; b=IgRt3iFpPidpdrvzBisS9bMgT2oDE52Z5Tmr/Vj8RO+vw1x/JUTK1LBloCtIEdNfbf eGIuArsOT1qgfDfaFaqLrbMTp9hIUtIGMzxxSMr2jzLR0uQMkTfPdknY1awW+b+IBK+d 0/OsbmA6ave2r1ijesgB899T/36zvbyToaSAlaJLI2bbYckZZF8TRDFagPuQWWxxpnT+ RQaJVPgs7Q9H7V6euU9QKVXEU0RFTblXlk55X0xyEYG3lsTreVT5iBECVstf4My+HSXw u5sEeu1uyXnRLr0APkuLa66X8UqekxJEY7jJ6aPLA1tb9yYAPDQE+wzUymARdqZdYnY7 FWQA== X-Gm-Message-State: AOAM531p3ZKFGwFIGntcJB7OpYxQS3x/1Lm2kx70yNOuG7/wr+qbka+O vT6MY3NYhn+F6BQn8DFy68cavpGRPqo= X-Received: by 2002:a05:6a00:1815:b0:518:9681:44ee with SMTP id y21-20020a056a00181500b00518968144eemr2058179pfa.15.1654126992852; Wed, 01 Jun 2022 16:43:12 -0700 (PDT) Received: from localhost (2603-800c-1a02-1bae-a7fa-157f-969a-4cde.res6.spectrum.com. [2603:800c:1a02:1bae:a7fa:157f:969a:4cde]) by smtp.gmail.com with ESMTPSA id h69-20020a628348000000b0050dc7628138sm2106303pfe.18.2022.06.01.16.43.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 01 Jun 2022 16:43:12 -0700 (PDT) Sender: Tejun Heo Date: Wed, 1 Jun 2022 13:43:10 -1000 From: Tejun Heo To: Tadeusz Struk Cc: Michal =?iso-8859-1?Q?Koutn=FD?= , cgroups@vger.kernel.org, linux-kernel@vger.kernel.org, Zefan Li , Johannes Weiner , Bui Quang Minh Subject: Re: [PATCH 2/2] cgroup: Use separate work structs on css release path Message-ID: References: <20220525151517.8430-1-mkoutny@suse.com> <20220525151517.8430-3-mkoutny@suse.com> <20220525161455.GA16134@blackbody.suse.cz> <0babd7df-bdef-9edc-3682-1144bc0c2d2b@linaro.org> <1fb4d8d7-ccc0-b020-715e-38c2dfd94c23@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1fb4d8d7-ccc0-b020-715e-38c2dfd94c23@linaro.org> X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE, 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 01, 2022 at 04:37:17PM -0700, Tadeusz Struk wrote: > Yes, but as far as I can see the percpu_ref_kill_and_confirm(&css->refcnt, css_killed_ref_fn) > doesn't change the value of the refcnt, it just causes the css_killed_ref_fn() to be called Yeah, the base ref is special for percpu_ref. > on it. Only css_get() & css_put() modify the refcnt value. > And for the "free the thing" the css_killed_work_fn() does that. > It calls offline_css(css) and css_put(css) for the whole css hierarchy. Yeah, the freeing path depends on the css_put(css) invoking css_release() which schedules the work item which actually frees. Am I misunderstanding something here? Thanks. -- tejun