Received: by 2002:a25:e74b:0:0:0:0:0 with SMTP id e72csp1807381ybh; Mon, 20 Jul 2020 07:44:01 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz3SgMp1AJQ0rY53SCC1lo1bXkEh78H3az0JqJpuyE/0of8H7gxylRXGYu4wdOuYkaqjNwR X-Received: by 2002:a17:906:5f98:: with SMTP id a24mr20430635eju.241.1595256240900; Mon, 20 Jul 2020 07:44:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1595256240; cv=none; d=google.com; s=arc-20160816; b=j4fDvCsfL0rHL3fkb6RmC0Vuk17N6RluNciYlPVzmUoAI0VMAfrqsDYQbfrkGDdg/R sZijfYMeMu5kw0gyHb4QdO6Pdawh+KDNT7vzMdP8EYKC3ZozKjR0aAsen+KvHrbuc3QN lihwdo7gdKgK887MNlgtP7pGMhtbtuCa2TjyOVooRKIs3n8s9IKcABVM3twE7/T9eEjQ xTHaUu62e+DaAmMjCtFEw6TCVC+TpqsvfQ095DBcShejAr1m1sTo0CKZwls40NDsFFbM yhO3ijS4A84Cg2Et42p1FkQHjia4BcRmsCLw/GSUqt1pu7Z87h2KvGVTYhdedxFVPQPD JN4g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=YCpC7J6X/zDG4Lv/9j3FlGLLb9onwW9dNbk0qHQHgBE=; b=w9tXXfjYWcQHkkTaducVl7SiuJqS7pfiUfNZMxW8+xhyYumw0nXD5gwH7/3vLdPFFi SEFF1f7fYxl4wUU7tJAWDEkRJnNDQbJ7m4+EcyeEzfGZz4UqwqvXdCEv4ppG6GBMi0C4 m6GR+eUHuGaoVMAOGhXzJtm9R+/lbtFNM1ZCFua8pjW8niwMGi1RweLYkpJ+gprsKp4s h2M1vJOjnovIdsIr35a0FVcfw2qG4pWDe06oEcNgogeudhRdJQUQfEiubFaAvNGPr7SE BCbD0AWcWfHWNQ7sBPy+XFcOXz5FuLnvgRU1o38w/AtSDGhiD53++NC680lv7Jua/yJY LOhQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id u12si10190495eja.373.2020.07.20.07.43.36; Mon, 20 Jul 2020 07:44:00 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726818AbgGTOlT (ORCPT + 99 others); Mon, 20 Jul 2020 10:41:19 -0400 Received: from mx2.suse.de ([195.135.220.15]:54030 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725815AbgGTOlT (ORCPT ); Mon, 20 Jul 2020 10:41:19 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id BA16EB82E; Mon, 20 Jul 2020 14:41:23 +0000 (UTC) Date: Mon, 20 Jul 2020 07:29:23 -0700 From: Davidlohr Bueso To: "Joel Fernandes (Google)" Cc: linux-kernel@vger.kernel.org, Joel Fernandes , Ingo Molnar , Josh Triplett , Lai Jiangshan , Marco Elver , Mathieu Desnoyers , "Paul E. McKenney" , rcu@vger.kernel.org, Steven Rostedt , "Uladzislau Rezki (Sony)" Subject: Re: [PATCH RFC] rcu/segcblist: Add counters to segcblist datastructure Message-ID: <20200720142923.mrudcweyttlmnhqp@linux-p48b> References: <20200719034210.2382053-1-joel@joelfernandes.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Disposition: inline In-Reply-To: <20200719034210.2382053-1-joel@joelfernandes.org> User-Agent: NeoMutt/20180716 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, 18 Jul 2020, Joel Fernandes (Google) wrote: >+/* Move from's segment length to to's segment. */ >+static void rcu_segcblist_move_seglen(struct rcu_segcblist *rsclp, int from, int to) >+{ >+ long len = rcu_segcblist_get_seglen(rsclp, from); >+ >+ if (!len || from == to) >+ return; Nit: You probably wanna do the parameter sanity checks before the atomic_read. Thanks, Davidlohr