Received: by 2002:a05:6602:18e:0:0:0:0 with SMTP id m14csp5508626ioo; Wed, 1 Jun 2022 07:03:16 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwqu2PgGvJpzFMsSU83MK43e9ljHtStKha3onu7Il+ucSzY9mBlAOeV+P9OccRUfMVKVzHH X-Received: by 2002:a17:90b:17c6:b0:1e2:ab17:a8f9 with SMTP id me6-20020a17090b17c600b001e2ab17a8f9mr23472373pjb.68.1654092195971; Wed, 01 Jun 2022 07:03:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1654092195; cv=none; d=google.com; s=arc-20160816; b=ZtPQaRHYr1LVH74QoO4NuJrsjqT1EQy2xHCjEsaIqIGgbE7p6qCMfmkJTj670zbljx ygzS6nSommlZmROI6lTzlhYFtFgzd1vsaI6MEC+Ue8qdjkUJy2Gtj0gsKwaCryLJC91p jKgcqvMFNPdC3htQQI00oPvvUWqEaP2C6eQaWkoU3y4X5drQWa7xMgGK5vWfV6JyI606 indtzKfwN+chRpLvLze4P5MQJtQz58egc6ieY6I+K8NQ+kpwij0JLLkDd8dDF1AQ8fm9 Xam5dZ9nDXzzgzi6Lr6lT0BUv1zjIphlLTwFQmCxghCLfXTd4XU5qV4Sd9iDSuxGm0Yp x0fg== 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=9PHjFs0sIqj5lWkWsEGrk3cMVyvsTEeIL+bMtOtQI8g=; b=JFXNAZlw2vpp9qTVyrxqliNUWgA9h8j1Nh1aumX39dUhCCJhnQDdySghEmldykl6Gx TM5TehziafSc7hHj4/HtndqmbL8zzECqZVx7hnjSW3NW3hmvsLDL/RyXqEwEdxKIccO1 qL3yBVOWNoe6bP6bFqY+PhODez0SmnvFSa3wlS7rXon6kO2G3vrv9kykdIyGx06PbOVF bm7cBSxTmlzZDpJNb+mhSesUXy+kYEfG0r+XDNSewPX7W3Z4FyX92LNXDbE2s24nMUlQ Rea4Cw+SSR1/hc2JsLjswfG65poINvnJWI6+uw9wR9QVuuwahmhEXJCKpAe8dUCiyQ7G DtyA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=OBgz4OH0; 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 x28-20020a63171c000000b003fbbddd215csi2142056pgl.391.2022.06.01.07.03.00; Wed, 01 Jun 2022 07:03:15 -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=OBgz4OH0; 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 S1346513AbiEaRWl (ORCPT + 99 others); Tue, 31 May 2022 13:22:41 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35018 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S243694AbiEaRWj (ORCPT ); Tue, 31 May 2022 13:22:39 -0400 Received: from mail-pf1-x429.google.com (mail-pf1-x429.google.com [IPv6:2607:f8b0:4864:20::429]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9D53690CDB; Tue, 31 May 2022 10:22:38 -0700 (PDT) Received: by mail-pf1-x429.google.com with SMTP id u2so2872678pfc.2; Tue, 31 May 2022 10:22:38 -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=9PHjFs0sIqj5lWkWsEGrk3cMVyvsTEeIL+bMtOtQI8g=; b=OBgz4OH07SYHRH6i23pXY3sWr1cgmBDmYWyyjFcfiUuhnPmpDeeb2eN9o2IHsnITBz V9SNk8FW9410NeGJYcONzvZjmXcODw60CjZo9oJFy09hjtKcQKrrG55qdu0nXK/t3m0A FITf826d/mlqQmC9tVBZzzMU9TgRmiBlzmZp8CdGUftW2jj3C7HSWBQdFOMeaX/kdbd+ mhK+WUW4hhuHqvysNs+J/lr01kTV5IPSMSEispnTynIofVHsFumoYmX+MUC1CFDAFEVo X/gF0pBGpAAYb0CXt7NfL56W/1E890doIHdDr92hZoZKimXBIlUnxDN4C45iYSbLfpcy UddA== 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=9PHjFs0sIqj5lWkWsEGrk3cMVyvsTEeIL+bMtOtQI8g=; b=s6dLwo7QUo1JDmq+WmwKznlhl4HdBusuxetQr4vmRKVi8SUCtP/sF7vcUWlu1QMdL0 G59RrrdIFnpex1CeiwpgXtqeVRDQKZeuzbNIeC3h9e+d6odUE6oVCT4/WdplFhPV74JT +8KIT0YVa7h7E+pJO+GeU1xjuIrDE5Pb/oaxitodVjboZnyTTSgco+aMB9IW4OPKiMPb 4h3mQU1/kOhbLdBPlWYAAMo5la5OBg3czkBHToZF3UIcTUtrfkkMJvJ6Em1lvdbM2Xtw cD1TTeajPGo5M1lYjHV8911otPcNdGsJPBafAuHIsV9qlusKJA/vY0lxlLOx9YD4rQKS Ygow== X-Gm-Message-State: AOAM530mHpZHhPPfwIKlULtIvhhnaFNpw8Jc9EtnHCHEXH6ZnDUNJgK8 6/wpw8p9B7/R9vjtbEr/DLc= X-Received: by 2002:a63:202:0:b0:3f2:75a7:cd28 with SMTP id 2-20020a630202000000b003f275a7cd28mr53414415pgc.537.1654017757983; Tue, 31 May 2022 10:22:37 -0700 (PDT) Received: from localhost ([2620:10d:c090:400::4:987b]) by smtp.gmail.com with ESMTPSA id oj17-20020a17090b4d9100b001e2608203d4sm2400455pjb.5.2022.05.31.10.22.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 31 May 2022 10:22:37 -0700 (PDT) Sender: Tejun Heo Date: Tue, 31 May 2022 07:22:35 -1000 From: Tejun Heo To: Hongchen Zhang Cc: Zefan Li , Johannes Weiner , cgroups@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] cgroup: wait for css offline when rmdir Message-ID: References: <1653619158-27607-1-git-send-email-zhanghongchen@loongson.cn> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: 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 Tue, May 31, 2022 at 07:19:31AM -1000, Tejun Heo wrote: > Maybe just keep the sequence numbers for started and completed offline > operations and wait for completed# to reach the started# on memcg alloc > failure and retry? Note that we can get live locked, so have to remember the > sequence number to wait for at the beginning. Or, even simpler, maybe it'd > be enough to just do synchronize_rcu() and then wait for the offline wait > once and retry. Also, given that it's an memcg ID issue. It probably makes sense to implement it on the memcg side. Thanks. -- tejun