Received: by 2002:a05:6358:53a8:b0:117:f937:c515 with SMTP id z40csp1347980rwe; Fri, 14 Apr 2023 20:05:48 -0700 (PDT) X-Google-Smtp-Source: AKy350ZIeM1qGcjMrVmHl3fpDdrwnrazMva1b3I0aR/R9YVRbEtZQcqbb3Y3s8roHYkDAFqcmUHU X-Received: by 2002:a17:902:d4cd:b0:1a2:8770:bb17 with SMTP id o13-20020a170902d4cd00b001a28770bb17mr6489315plg.9.1681527948646; Fri, 14 Apr 2023 20:05:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1681527948; cv=none; d=google.com; s=arc-20160816; b=eAsprilRv6s2JjAlc2ZvGBQapQ1Kc9U9GGvfkODv03FMBDNGwwdGRTdQuguoGUy8KN IOskFccfPoKHehVzhL8rdJzIG7ohpF0yutlWiIa+r3gC/QhaA42g99de7LI7mkiwgcHa 5XJelrO2ymCeD0EnWbTp4fYV23yGf2dvtQyCi1Y+tnx/Cy9etdaL7S9cl2b2h4un7hqt l7L4DhGKjx4WMt9lLPwqXAEOUwm3Rb9wdUbPxd/kWgdHmeHzv9Wqo5oFKcyV5JGKsIRa v9X63FM4+cn3xiV/Pnn0uhg+jpzJrZFqWr+bYYLtbCRsCsURsQWucOmoYcWoVa5xBZH7 kYtA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=VdV9eCDdpzQ0FmYaITELHku1bGeXetDAr1SzLbg4eSA=; b=T5semoEf/WacM1QnfkrVas/FsuhiCX6dbGPhaGl/2Nt+dphii8dzp/bbwRVWNTXf47 rafzQeSRv9sHC8oDGgv0WdZ/9YR8ZugX4kro04mC+NyYq3hGeFgNAigK1PF/fVRg7QL8 sqivKZD2ySzP4WqfGuHUV0FAf4Zl9qm3mgsJ8/Nen/X5JBbM7WnBE10KELExWNKXv301 7JLmT8bDqjkCk35qdtnyHMBrmEgz2nKqoxSzMIY+U2ZbiYdqzTPsqGP4RUzWd0nCczh1 qh7O27I0P1WM9duN6+BViTsgnWssGS+tnlHGgbtG5PWKWRxC9AM17AoVYu/s9tGkvbXp NsgA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=G20KdsRO; 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 x6-20020a1709028ec600b0019e9c8e51f4si5804416plo.165.2023.04.14.20.05.36; Fri, 14 Apr 2023 20:05:48 -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=@kernel.org header.s=k20201202 header.b=G20KdsRO; 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 S229999AbjDODE5 (ORCPT + 99 others); Fri, 14 Apr 2023 23:04:57 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59698 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229462AbjDODE4 (ORCPT ); Fri, 14 Apr 2023 23:04:56 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 75D4144AE for ; Fri, 14 Apr 2023 20:04:55 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 10F94644E4 for ; Sat, 15 Apr 2023 03:04:55 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 013CCC433D2; Sat, 15 Apr 2023 03:04:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1681527894; bh=oWel6s+C+uqagn6K4/nTnPlyC70jxGXPY+vOwAK6HE0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=G20KdsROA4xaDU+ubwGVzeWYkmacNQkMqQ4YtlsG3dtqaGC+E8CQgaQwummAeQMcc EeGWMhI5Iu9NJsMiAfk51CttGuCrnuvyYKGcyriowNrINWnSBcB70XvoGUC2VsRK/G nBFwDkBGuujxpcdJtVmuR3gKy9yjBhnDQhfGGTQFjhKE2pD97hT0px1pVgHPsO9bYC dy4tu4JKtM9QmetkVrP7AA1bRkxLdzKVCPgDN1WIkpsL29WAcfLsgIyxplNJcMyAXq lXMvV7MAdfHKVx50WgOinTprAkIUYmCoFlJ4dmn40le4uqbMwtNPmaolldwbkUeUk3 WeWopPJAQbdGA== From: SeongJae Park To: Matthew Wilcox Cc: SeongJae Park , akpm@linux-foundation.org, vbabka@suse.cz, linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 2/2] mm/slab: break up RCU readers on SLAB_TYPESAFE_BY_RCU example code Date: Sat, 15 Apr 2023 03:04:52 +0000 Message-Id: <20230415030452.3223-1-sj@kernel.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, 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 Sat, 15 Apr 2023 03:51:54 +0100 Matthew Wilcox wrote: > On Sat, Apr 15, 2023 at 12:37:53AM +0000, SeongJae Park wrote: > > * > > + * begin: > > * rcu_read_lock(); > > - * again: > > * obj = lockless_lookup(key); > > * if (obj) { > > * if (!try_get_ref(obj)) // might fail for free objects > > - * goto again; > > + * goto begin; > > * > > * if (obj->key != key) { // not the object we expected > > * put_ref(obj); > > + * rcu_read_unlock(); > > * goto again; > > - * goto again; > + * goto begin; Oops, thank you for catching, Matthew! Thanks, SJ