From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 270C5241F4 for ; Wed, 6 Dec 2023 13:54:01 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="SNetY+09" Received: by smtp.kernel.org (Postfix) with ESMTPSA id E23B6C433C8; Wed, 6 Dec 2023 13:54:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1701870841; bh=iOiOJkTHnXU+Cx/umDTZmLjx0e963P9Lpk2W/B0Z0h0=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=SNetY+09l8T5OlZOcmBgb0T3ptNyxuuAU5+V+o4vPKuL3Ec0VU71f0CGagHKZHQEi M6bVHDTxWRhoL/jwEvg6lB/47df/cnlWSy6UIVC5KhwGB45Dz9h9AniC45p1aWFYx2 wybGsenQoJUvSkBUuHTJ4IZi+RnH2AX5vRqh8o/6g171zdhkecjcZI5KXk7p3wPOkE Ypzn8h0Z3eyv4fkbqSCUf1NpRnL4g+t+KCUKrzcEIXUGO107WFsbGG73VX362Rn2F2 1i+MbgMqhlbFedpuyRLAFktaLlKRUc6V0H+f2mn2BXWLpffn1uSen03ScOjk4joZbR uhZ9Gz6XvYr6Q== Received: by quaco.ghostprotocols.net (Postfix, from userid 1000) id 42842403EF; Wed, 6 Dec 2023 10:53:58 -0300 (-03) Date: Wed, 6 Dec 2023 10:53:58 -0300 From: Arnaldo Carvalho de Melo To: Namhyung Kim Cc: Ian Rogers , Peter Zijlstra , Ingo Molnar , Mark Rutland , Alexander Shishkin , Jiri Olsa , Adrian Hunter , Nick Terrell , Kan Liang , Andi Kleen , Kajol Jain , Athira Rajeev , Huacai Chen , Masami Hiramatsu , Vincent Whitchurch , "Steinar H. Gunderson" , Liam Howlett , Miguel Ojeda , Colin Ian King , Dmitrii Dolgov <9erthalion6@gmail.com>, Yang Jihong , Ming Wang , James Clark , K Prateek Nayak , Sean Christopherson , Leo Yan , Ravi Bangoria , German Gomez , Changbin Du , Paolo Bonzini , Li Dong , Sandipan Das , liuwenyu , linux-kernel@vger.kernel.org, linux-perf-users@vger.kernel.org, Guilherme Amadio Subject: Re: [PATCH v5 15/50] perf maps: Add maps__for_each_map to call a function on each entry Message-ID: References: <20231127220902.1315692-1-irogers@google.com> <20231127220902.1315692-16-irogers@google.com> Precedence: bulk X-Mailing-List: linux-perf-users@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: X-Url: http://acmel.wordpress.com Em Mon, Dec 04, 2023 at 03:46:08PM -0800, Namhyung Kim escreveu: > On Mon, Nov 27, 2023 at 2:10 PM Ian Rogers wrote: > > > > Most current uses of maps don't take the rwsem introducing a risk that > > the maps will change during iteration. Introduce maps__for_each_map > > that iterates the entries under the read lock of the rwsem. This > > replaces the maps__for_each_entry macro that is moved into > > maps.c. maps__for_each_entry_safe will be replaced in a later change. > > > > Signed-off-by: Ian Rogers > > At first, I wanted to have each conversion in a separate commit. > But it's all mechanical changes so probably ok to go together. > Acked-by: Namhyung Kim I think we should do it in separate commits, Ian, can you please consider doing that, please? I'm pushing what I have to tmp.perf-tools-next now. - Arnaldo