Received: by 2002:a05:7412:b10a:b0:f3:1519:9f41 with SMTP id az10csp3055612rdb; Mon, 4 Dec 2023 15:46:44 -0800 (PST) X-Google-Smtp-Source: AGHT+IFjiT129WCI6xb/u1lIcU3MAcMcoPOUvO23dhfYdZNVaRS6XFBjIGlvphFZh80cDFv3VBCj X-Received: by 2002:a17:902:d891:b0:1d0:6ffd:e2b4 with SMTP id b17-20020a170902d89100b001d06ffde2b4mr5371021plz.78.1701733603918; Mon, 04 Dec 2023 15:46:43 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701733603; cv=none; d=google.com; s=arc-20160816; b=R3ZSHxIQVDVN98O3X7tRNWFMzUvLBoEceJn1nQxlYejDyi+mqzU0QDkC6vHy7IKE98 LiYTvpqTdx9t1qhoqtVYn1IZtzerwCVYTxDM0VGzFZI87hTUumdIrBXZCDQs16Uj/dyM 75PwTg0fXSHHne6vQGYDUn7sYYqjXBeiaBpwUotCjc7K7NJDpl4261+1h8SJQ1GBbcPg 4Dppi2fDZn/WVrjcCG3XL+ZHGB8YEQTE3EWBOAJKcY01C+z7V2vzMFQrVQz7ai1u59L1 bwMTx835B85qu4kXb670KMVmawHWZEZeGdXpVdICZWyUzIFcAEYOZEdM1KxEFIqMR8a4 Xchg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version; bh=I/elQWqiCcjUeZujxgQjEGXykiQhACl9CW+6Atyw0+4=; fh=aWa9tyepd0GWyBFjkZa5ys7uNwpZ1AjfSj0Mu1iuQbE=; b=yXtsWAubr9lMpXVsjjKzLhaeYspJb73KMkbKrr9Ap67qDEtBgFn8nSwB+barGFBmc1 p41AulYTtgQ/RIULUT+QHeaMyeRaRtsWQHaxckdxHecQiwyQ7sP9d7ujFM6G9JYFkNPD brMQwc6SCPETnF51m0/GlUeYWX5Gr3CP0wwyD8oeW+C8CpgHsyespXxiwWiBoJ6RlFh3 aVlmMmQLhaAPykDA/jnTMkWHhC+aBrRdAyEVaOy6jGp8xUJ+S0RUBn19s7RlNlZ48fla yKpYjjsh8D0Ggia1CKb0tmrwpoUkCz+XddEYfCYpgNn7r41OYeXngnMNQfAfaC709VYl hnqw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 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 snail.vger.email (snail.vger.email. [23.128.96.37]) by mx.google.com with ESMTPS id q18-20020a17090311d200b001cc282684c6si8766377plh.278.2023.12.04.15.46.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 04 Dec 2023 15:46:43 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) client-ip=23.128.96.37; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id F24BC80B01D0; Mon, 4 Dec 2023 15:46:35 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234803AbjLDXqU convert rfc822-to-8bit (ORCPT + 99 others); Mon, 4 Dec 2023 18:46:20 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48698 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234721AbjLDXqN (ORCPT ); Mon, 4 Dec 2023 18:46:13 -0500 Received: from mail-pf1-f178.google.com (mail-pf1-f178.google.com [209.85.210.178]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 19890109; Mon, 4 Dec 2023 15:46:20 -0800 (PST) Received: by mail-pf1-f178.google.com with SMTP id d2e1a72fcca58-6cdd214bce1so5372979b3a.3; Mon, 04 Dec 2023 15:46:20 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1701733579; x=1702338379; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=J2jpvdls81A8CJqvJTCgXPJeqzKz6GPCtnOBOaW0I9c=; b=U3xpB5HZ9VRwnQs/y1l18Fgw8ZdLEQX+0ux/rSSfGZbL/s3tXPtnlcXtHzge4zdCaA hKW3y2xzQr1z/pLvh+Sh5W3RMBINymJtlo9BwaVjWuUL07q9ZlUX49vpQtac7VN0J2p/ r2quHohRWynPW74Plus2yNj/W4o1pvXuMYAMZMjKA1chOt0hkkC//6lvueI+KAgC0AlD i0us4muQ44/pIMuXEIN2mmysSxJS2ApqJwfU16DkumlqP+P0HqqURNnyLDLOhM4p08RY gpsmapSv5TOu2GZ+Gmkw/LVA61re2lNMwwYyvfbvFE5LsFN2PfIwp3aoyYE2WPnthhWn Tv6Q== X-Gm-Message-State: AOJu0YzpaHROHNrQmEIdiOo3h0nBGQNEwG+6d/sAy+xhGiFGlpqO+WYX RV+KblDbS9HQFiGHwQO2mMm5pq72ayQw3/HxfGY= X-Received: by 2002:a05:6a20:b928:b0:18f:97c:8a44 with SMTP id fe40-20020a056a20b92800b0018f097c8a44mr4748532pzb.111.1701733579462; Mon, 04 Dec 2023 15:46:19 -0800 (PST) MIME-Version: 1.0 References: <20231127220902.1315692-1-irogers@google.com> <20231127220902.1315692-16-irogers@google.com> In-Reply-To: <20231127220902.1315692-16-irogers@google.com> From: Namhyung Kim Date: Mon, 4 Dec 2023 15:46:08 -0800 Message-ID: Subject: Re: [PATCH v5 15/50] perf maps: Add maps__for_each_map to call a function on each entry To: Ian Rogers Cc: Peter Zijlstra , Ingo Molnar , Arnaldo Carvalho de Melo , 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 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8BIT X-Spam-Status: No, score=-1.4 required=5.0 tests=BAYES_00, FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS, RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=no 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 X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Mon, 04 Dec 2023 15:46:36 -0800 (PST) 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 Thanks, Namhyung