Received: by 2002:a05:6358:16cc:b0:ea:6187:17c9 with SMTP id r12csp6884576rwl; Mon, 9 Jan 2023 14:32:58 -0800 (PST) X-Google-Smtp-Source: AMrXdXtftzS6gTDoWxJ0ugit5Tc3tmG6/rWcQ+oNzA+ge5iODMZCpL5C+byqxblSN4wuP75wiFQn X-Received: by 2002:a17:906:8d0f:b0:7c1:7c38:f079 with SMTP id rv15-20020a1709068d0f00b007c17c38f079mr41046179ejc.71.1673303577881; Mon, 09 Jan 2023 14:32:57 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1673303577; cv=none; d=google.com; s=arc-20160816; b=sNmZ/+sAS3c2ktqrd7noEVCOhCavRcsfQYX3ENDtRtRxXY1pT3lWai7Klt87eSXwxF RwUJ6zzEYtl5w8Wbmng/GuT5REWqTN9dytns74CdyZYb3MhtTIpSx/wM9mgEIkygnjwL 9Sqf990oph8R7aiS4Vm9GobFoMaubLz/IwBjlwF76McxIy4djmj+UMySOIe8Zd1q6Qg+ pS8ViLEP35h6PzD5bqNq5LilsyVvUFN4PghgR3AaSXiT8aBbyWFj8UbDvJNQ8YxalZs4 JwERzCc3u4AuQFxV24vZAw2tUcDDkcyUlj6L1hnHLtFEl0xBxnJUUMjzSpBdAm8kgPQi CVxw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version; bh=JEEX2OO6+70H54rsqQSU+me7VFu4QpBB8JmfXrf15IY=; b=MB/Mxrjo+XTsM+NgVjrmmaoCJN+Pcls7smHXZCReDHlyDG57Qt9j9rHzkAg5SDxp74 5SIroFnwuiSuHevI5kVWkgjSPYYlx13wSWs4zAZkdBgMyRLXIh9YC1XRvQDdxDka6xvT PA4ioBInT87QffpkCTqV72GLGdKcQAOl5BjFhCEUHz5YA8ZDAZcNQzCakPF/d8UhFumT o3wy/BuIfZCDJ/1r8lrfKpQETCH2TBjhx/maiRlqX09o3FMZ14l4aeua4XS6lnSLVl8X foXu3Ow4bfDg3fKsacSNwQ6QAyVvmpj0GxVvq6Q0BVbDry98Wr61ywVEqD5qt+u/VUJL TV0Q== ARC-Authentication-Results: i=1; mx.google.com; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id ss4-20020a170907c00400b007e9516bc01dsi8689353ejc.212.2023.01.09.14.32.45; Mon, 09 Jan 2023 14:32:57 -0800 (PST) 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; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237476AbjAIW0F (ORCPT + 53 others); Mon, 9 Jan 2023 17:26:05 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49196 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235462AbjAIWZ7 (ORCPT ); Mon, 9 Jan 2023 17:25:59 -0500 Received: from mail-io1-f53.google.com (mail-io1-f53.google.com [209.85.166.53]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D201C25FA; Mon, 9 Jan 2023 14:25:56 -0800 (PST) Received: by mail-io1-f53.google.com with SMTP id n63so5278821iod.7; Mon, 09 Jan 2023 14:25:56 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=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=JEEX2OO6+70H54rsqQSU+me7VFu4QpBB8JmfXrf15IY=; b=ArNpYxYwHhkGpcVD2RhXUxUhTcU4TPA4CF0tHfW6Kofrn4LQTH5ZyPLgHvQVE90MxN tJ0uQroqoAEOm0K5Qhz4YlME3NFIRNHzm6sxdJOk8Bl9tS3BZiQDBgmj8SeLs0pQyK5n S4GC+a+3oWzqa9z604gvZfFKuJYja/5IN2mTI02+1DxB2hRuv8yfsGcVE6R4tSk7lJZH rWRudOETGtR/iSlhT5GFpQxTym57yFM3C+mE7nWajKEEstxLXU4qrfT2z2BTPcaAVB3I htjSjOEMJkf7xYBjCICRwRbJ3Zb5iJ2LAHD+6QCebXxi3VJIMqeU9KEGz0VlbPpIF4nL QvBA== X-Gm-Message-State: AFqh2kp2A0hJX/5ibZrVD/qJr1aghJcFAVFIqyPPXZsBsSzr+Xv6iGim eLnkGOT/UDxa9Nmdi/uNV0OJNGqnFY8EqxRm4MzgG69q X-Received: by 2002:a02:6005:0:b0:38a:3421:f2cb with SMTP id i5-20020a026005000000b0038a3421f2cbmr5353588jac.308.1673303156063; Mon, 09 Jan 2023 14:25:56 -0800 (PST) MIME-Version: 1.0 References: <20221118190109.1512674-1-namhyung@kernel.org> <7ec772fb-2108-5945-a308-4bb46fcf0090@linux.dev> In-Reply-To: <7ec772fb-2108-5945-a308-4bb46fcf0090@linux.dev> From: Namhyung Kim Date: Mon, 9 Jan 2023 14:25:44 -0800 Message-ID: Subject: Re: [PATCH] perf lock contention: Do not use BPF task local storage To: Martin KaFai Lau Cc: Ingo Molnar , Peter Zijlstra , LKML , Ian Rogers , Adrian Hunter , linux-perf-users@vger.kernel.org, Song Liu , bpf@vger.kernel.org, Blake Jones , Chris Li , Arnaldo Carvalho de Melo , Jiri Olsa Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-1.6 required=5.0 tests=BAYES_00, FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS, RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_PASS 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 On Mon, Jan 9, 2023 at 1:23 PM Martin KaFai Lau wrote: > > On 1/9/23 12:56 PM, Namhyung Kim wrote: > > Hello, > > > > On Mon, Nov 21, 2022 at 9:33 AM Martin KaFai Lau wrote: > >> > >> On 11/18/22 11:01 AM, Namhyung Kim wrote: > >>> We could fix the task local storage to use the safe BPF allocator, > >>> but it takes time so let's change this until it happens actually. > >> > >> I also got another report on the kfree_rcu path. I am also looking into this > >> direction on using the BPF allocator. > > > > Any progress on this? Are there any concerns about the change? > > Yep, I am working on it. It is not a direct replacement from kzalloc to > bpf_mem_cache_alloc. eg. Some changes in the bpf mem allocator is needed to > ensure the free list cannot be reused before the rcu grace period. There is a > similar RFC patchset going into this direction that I am trying with. I see. Thanks for the update! Namhyung