Received: by 2002:ac0:a594:0:0:0:0:0 with SMTP id m20-v6csp4745135imm; Fri, 18 May 2018 09:57:51 -0700 (PDT) X-Google-Smtp-Source: AB8JxZrJqr1XvVY5XgHK8FYESm9yAruyEvnOV+ooXK5Cu3IWDFJ77Nh9yMuKystp8CPlnY5y/GkT X-Received: by 2002:a62:449c:: with SMTP id m28-v6mr10150945pfi.145.1526662671014; Fri, 18 May 2018 09:57:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1526662670; cv=none; d=google.com; s=arc-20160816; b=gRbmiJhwcPDn0HP9CIowaZIpKF+KF3igqhXVIHb9n7GiWIZclVL91PjBcF2ObfrXBF fSWuaCIySo+mlvGuM5ocdsCknwfLVhBrHf/MX8mWt/+4RGXDmevS8e0NL+/7sqpx/Xzj r1KHEu/l7D0HrbgDfdMgnz0wdvlR1M4efUo72iCYVNY590YZJ7ETVTF/zaikRk9bQey/ /IRk3LRauhH4wEQ0kjoSKa0klok7Eldy2EgA2DP4tqXAO4gtthK6M0NPsJgFNDscfw1b W1+QN+lp3mS6qI3+RdbnWGjYvjUygqivG7n4SL12mdoOWxB7v2EqU/iDTYVyuicwRa/F PjwA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature :arc-authentication-results; bh=E0MsQ+GkkSdoH7SRz+g0c3oXHIX12fFkGECVpHEIJG4=; b=kvVoOwFHTIMRymF6yFqiC0hvIyJxyiXshK4DkkkKyTGKSRY3jWNbIperiu9vOgVvBK SAp1Ny5GOZWPnbzT1uIhu8dK/UQPP17MlbxmXBZt1J4vXdOyOnYNZn1tRNPxGFiOg/h9 LXkiXthdXVeBv3zqaSbEXg0I0NlUiEnZhE+aj1+MNrfXkx//nqPCbiwxBSozIcSRgwpp j+e4FrOaUB4RIHUvao0sH0O/6NkP3E/v9BTdZJHinfgHT5ZPfPDFi4tv3lW1p0ULYTol LLxfTMn4g/KVEH2F1QLf1iUEr+kTzIvax+HCeYqWt9RQmygUmRqBLQDuf3SsxHp7YSrv hIDg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=google header.b=GfZUthS4; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id q6-v6si7742127pfh.17.2018.05.18.09.57.36; Fri, 18 May 2018 09:57:50 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=google header.b=GfZUthS4; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752593AbeERQ4q (ORCPT + 99 others); Fri, 18 May 2018 12:56:46 -0400 Received: from mail-it0-f67.google.com ([209.85.214.67]:50247 "EHLO mail-it0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752218AbeERQ4j (ORCPT ); Fri, 18 May 2018 12:56:39 -0400 Received: by mail-it0-f67.google.com with SMTP id p3-v6so13954878itc.0; Fri, 18 May 2018 09:56:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux-foundation.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=E0MsQ+GkkSdoH7SRz+g0c3oXHIX12fFkGECVpHEIJG4=; b=GfZUthS4ppUMhD8PKdLCEOz0fmaPBI0M9RvnJMWNRIPRCfYOgL7vVNYHLk1gwFznDE x5WhOBxKuJjvgAnRru87foQXG63m2BINW4JarTvd8LhjTfI7Nfz3wlTXWoOxUXWIPLOK fA8KVSwo7C4xCFMTQtHo/z7viV1tgjscrwo9Y= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=E0MsQ+GkkSdoH7SRz+g0c3oXHIX12fFkGECVpHEIJG4=; b=DfrCOa/UrYbFbpnJgp2QqGjJIarzPC6txrr+xXwWdX6P7NseIaKIQwWB4JVtBUJiVR AoTbtGNMU6YcYN3GL6+6Homc7/BI4/rhwBLrIBB846QlEWVeWCJ0q0LxSBo1yTChUL0t PgFgM4EX+5oXOvG30TlRT3kbGCQAoBj/1CIDKuIqx/j8M1rHbAIH46kdYZj16avXp8Hh 1S3Omfhr7tQ/EqyXR7Qh9CEeazBR1GjjYEm/lpssbzRGjgOTzpfw8hfExCu9ME8UM1PZ g9OaYnVAlOvM3d327noOy6zz7XYeIiWGfJZ6OpP54uipft47dbFLHtvrq2a9FMDo+pQx ChCw== X-Gm-Message-State: ALKqPwcsduiSahtq9Ym+ptM4BOYFYKoqHGeNnzhM2bWjqT1ygTVVuMTE 5hBR7h76xC+6d719VSWwCge6sFHpm/cLv6PSNH4= X-Received: by 2002:a24:3ccf:: with SMTP id m198-v6mr7671841ita.113.1526662598834; Fri, 18 May 2018 09:56:38 -0700 (PDT) MIME-Version: 1.0 References: <20180518130413.16997-1-roman.penyaev@profitbricks.com> <20180518130413.16997-2-roman.penyaev@profitbricks.com> In-Reply-To: <20180518130413.16997-2-roman.penyaev@profitbricks.com> From: Linus Torvalds Date: Fri, 18 May 2018 09:56:27 -0700 Message-ID: Subject: Re: [PATCH v2 01/26] rculist: introduce list_next_or_null_rr_rcu() To: Roman Pen Cc: linux-block , linux-rdma , Jens Axboe , Christoph Hellwig , Sagi Grimberg , Bart Van Assche , Or Gerlitz , Doug Ledford , swapnil.ingle@profitbricks.com, danil.kipnis@profitbricks.com, jinpu.wang@profitbricks.com, Paul McKenney , Linux Kernel Mailing List Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, May 18, 2018 at 6:07 AM Roman Pen wrote: > Function is going to be used in transport over RDMA module > in subsequent patches. Does this really merit its own helper macro in a generic header? It honestly smells more like "just have an inline helper function that is specific to rdma" to me. Particularly since it's probably just one specific list where you want this oddly specific behavior. Also, if we really want a round-robin list traversal macro, this isn't the way it should be implemented, I suspect, and it probably shouldn't be RCU-specific to begin with. Side note: I notice that I should already have been more critical of even the much simpler "list_next_or_null_rcu()" macro. The "documentation" comment above the macro is pure and utter cut-and-paste garbage. Paul, mind giving this a look? Linus