Received: by 2002:a05:6358:53a8:b0:117:f937:c515 with SMTP id z40csp1347646rwe; Fri, 14 Apr 2023 20:05:21 -0700 (PDT) X-Google-Smtp-Source: AKy350bw2iNCS3qx+1l/uT2r99/aMCSabVXFUDephyquqtw/t8TaWlsyV1KjnzjT7K7aUtnUqKR+ X-Received: by 2002:a05:6a20:6d16:b0:d9:2818:441 with SMTP id fv22-20020a056a206d1600b000d928180441mr6814538pzb.5.1681527921527; Fri, 14 Apr 2023 20:05:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1681527921; cv=none; d=google.com; s=arc-20160816; b=hg4LVyXiozYahcqAgKAQAaEtkUmPUHdTnrv4Hsqisj6eT4eEaSmhBvXJLIafqeuEQu UyACO754Hz5tEfKCzIJKL5zVY3nzi9raNOQyLzzkHc4BU2R32PSkBMCa+pWX2vh11szA 9d885Aa7qGyvC5HkqQY/EyKHdVjdlbL1xWYIZq9d0odDZJxX2zK4eRFFFOlw+ZhHOiM4 aG5XDr7oU88P1lwrN1h0L9za8wCzGwLeoZeY5IIwqrLnXxcLgz7jionoWholm5kHHfB5 oV0wwa2ivxUiYK+AeSKoLM70wkj2Nbuh+GfDURgy1W4pK3T9n3SuslDOhe/arM+3ra0t dcsA== 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:dkim-signature; bh=XGuO69WtYg3FOioC8caWzcFVIlRUk5ATc1N/1b6YxYU=; b=SUqH/v/Js1PqFf2hvXVavqnt5HnRuDP+edbxsbQR0hHDpQ2Z+T2AKCgHNhPuUjXjVB UHp5T/DCSQYER5iwBhGOQTJvsdF0NoSaftkG0XuD9SSA40jcCuNEZJ74Em0CtW182NwI zoFpBGS3wyjF813L5EPl0qoQ/AZkxA48Z86RPq9Wy+AJzQcsy8thsqTy8bNPQfkcW4zU aZHHcdOzzUXbCKiHCizGvtMR8ljfnQEszX15+ah8iIJ6mr3EPgQLnobGqPjnLQa8Zk9o 99vAEl4M2HttWDrA6yWDd8095gwzqfueV2dwyRsBsIvvfFiSCsaUMyIpXlL8Vu65GkhI XV7g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=RLqQE4Zl; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id s1-20020a63dc01000000b0051367d9cf70si5643822pgg.93.2023.04.14.20.05.00; Fri, 14 Apr 2023 20:05:21 -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=@infradead.org header.s=casper.20170209 header.b=RLqQE4Zl; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229749AbjDOCwD (ORCPT + 99 others); Fri, 14 Apr 2023 22:52:03 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57904 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229462AbjDOCwC (ORCPT ); Fri, 14 Apr 2023 22:52:02 -0400 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5011126B8 for ; Fri, 14 Apr 2023 19:52:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=XGuO69WtYg3FOioC8caWzcFVIlRUk5ATc1N/1b6YxYU=; b=RLqQE4ZlfFYK1ZP1Fd8ITikILx GAa3bUkiIz/xpcoRUmdIXUjYgblz+ZROCXu48Jb6oiltVbX8a5GI6qMKXTzY+NgsIF8b85a051cHU qx8lPAjPro8yjYn2D51WNT/Lg5nma8Jke1U7YRWuycKpya2F1fUtJ9q8hv2E2wgGxvCRMjDL4T55y ZiWsf0FHcqVyTgRxOpZQYViPk5/gkn2+Zh88wDEVClwRYG+S1lbTPpqza5PIsa4Iw2Adzv9Ay7f27 lxk7Bh/gzNB/Peux8F1qztydZyOzm7SzQQw8on4K68WMWg9/OjmVoiOr0eFSnD/CBgp+0BQQpWpkw E8nI6/Hw==; Received: from willy by casper.infradead.org with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1pnW14-009Iav-RJ; Sat, 15 Apr 2023 02:51:54 +0000 Date: Sat, 15 Apr 2023 03:51:54 +0100 From: Matthew Wilcox To: SeongJae Park Cc: 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 Message-ID: References: <20230415003754.1852-1-sj@kernel.org> <20230415003754.1852-3-sj@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230415003754.1852-3-sj@kernel.org> X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_NONE,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED 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, 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;