Received: by 2002:a05:6358:16cc:b0:ea:6187:17c9 with SMTP id r12csp6830627rwl; Mon, 9 Jan 2023 13:44:19 -0800 (PST) X-Google-Smtp-Source: AMrXdXtOdyUQ52vE0NXE+WI7lKu5XBoJwxMIbKez9BDos1pug5DCkK/PBLVheKwt2TY0hqZ++Kbf X-Received: by 2002:a62:198a:0:b0:577:d10d:6eab with SMTP id 132-20020a62198a000000b00577d10d6eabmr64635357pfz.21.1673300658927; Mon, 09 Jan 2023 13:44:18 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1673300658; cv=none; d=google.com; s=arc-20160816; b=LmDIgbXoLJe8B5vEDkE2QzaMRiUNSY2x5A3ERLRRhTYnB8ultc7Sp5Jn/BYZho1yl4 C8cke+YHFS7hNmDAGcs9dSIuW05dTN2ZLM3iT3BxaRXdwKU0iuDiHwQQxb9S8+++AYMw w7CIIqjeVpy3HoKyxKmJcocNaCgFIuXyUus1+sAjNPA84zq++9ABN7WX3nbwRn81ZLae dwR3jTjpK6MRpYCcFxMOE60qdsjxQHAOYnLQ+uaDzoRxf7W2l+NwxvTKbKCwdKf/mZDb KSwhNU02H6LKk3hyYiUaqzqP9lXabuKIQh4Wog8ggjFi2IvhKi7UjZ29vusqWvpooetW d8gw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:mime-version:date :dkim-signature:message-id; bh=ccawMTleCmZz1jGx2iBWYJBoqvkqRsUGvWtniWP7DjU=; b=o8joGoYwYVjVMnMvshL+niL/U9lSjfrz6JvIergU5BbSfxfA4TJnWazi7EpJyeQo9E eDnWdgbuPcdE1DSBUvs3DIHKdMVgtlmPtcx0hx7D/21/jWnOOL0hyLWsc6KAtwL1tJVh aQZAcZSBpGkM0MIMtMmFI4HSYde6kwH9Cnya2/aIXgVKThjYLw3xkTl/hpRqPFbk2RbG JuthAfzSuz3JUbPageEguma2sJFWSqyWcF8smcdYJC6SyWaypGuuTh/Fm+Sea+VqfiL9 uQXCz577vESxiQ2VP0Pe8HwsVW5a0Nl3ntCRVAVBVM9Dfw30azM2sUjVaLq+jse3r7D2 yDaA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=FFcuPegR; 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=linux.dev Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id w1-20020a056a0014c100b00589170e18cesi2550276pfu.170.2023.01.09.13.44.12; Mon, 09 Jan 2023 13:44:18 -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; dkim=pass header.i=@linux.dev header.s=key1 header.b=FFcuPegR; 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=linux.dev Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237802AbjAIVZR (ORCPT + 55 others); Mon, 9 Jan 2023 16:25:17 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34352 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237418AbjAIVYc (ORCPT ); Mon, 9 Jan 2023 16:24:32 -0500 Received: from out-234.mta0.migadu.com (out-234.mta0.migadu.com [IPv6:2001:41d0:1004:224b::ea]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 157F413FA6 for ; Mon, 9 Jan 2023 13:22:55 -0800 (PST) Message-ID: <7ec772fb-2108-5945-a308-4bb46fcf0090@linux.dev> DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1673299374; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=ccawMTleCmZz1jGx2iBWYJBoqvkqRsUGvWtniWP7DjU=; b=FFcuPegRP+Lqf0FJBJna8bWVwotz9tpjIml4MmxXbv7ar5KcYsbunlc+/z42M04hlGlytQ eqXAWBJ1Cw0w8bnWae8iC/K6/dTvX7ulnH1A0L4jH1TOTBDIgbYfSwvjLIbxouzVM+/y1k MQIRuyTwNKIjG4MEmM+C5VYGJcWZ7Ig= Date: Mon, 9 Jan 2023 13:22:46 -0800 MIME-Version: 1.0 Subject: Re: [PATCH] perf lock contention: Do not use BPF task local storage Content-Language: en-US To: Namhyung Kim 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 References: <20221118190109.1512674-1-namhyung@kernel.org> X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Martin KaFai Lau In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Migadu-Flow: FLOW_OUT X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS autolearn=unavailable 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 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.