Received: by 2002:a05:6358:700f:b0:131:369:b2a3 with SMTP id 15csp845139rwo; Wed, 2 Aug 2023 05:15:30 -0700 (PDT) X-Google-Smtp-Source: APBJJlGvHRF0ePZXr2OiRzr6Dy6PGctHWh8R1eX82zGZVuWgh64Od57Q05c1xzPYXZsNdg61hSis X-Received: by 2002:a05:6808:3008:b0:3a1:e12b:2f80 with SMTP id ay8-20020a056808300800b003a1e12b2f80mr16940569oib.35.1690978529705; Wed, 02 Aug 2023 05:15:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1690978529; cv=none; d=google.com; s=arc-20160816; b=VL5ixBQSqqgDKizJpBniAZr74LL8HH8zr9sNi6apo0y2/qkpgxNl5yU0JMRBccFFFR rI0R+ptqrFKkvIpKEtdSm/lOsNGMczOXBJyNpAXxKHsmsw1liO6tJXF94LMnp6D47mii LdrbtMDtCf8DWxqnodqsJufzdUpIVhnegFHdesCpYhEPSyKc3RcLmB6vCK2OcjUrKjN1 XgqHb2fTVhl8NfpK/M2kDxCDlEwCFSrbXrn8iLqHW7035CkXKmuxcT+kHmsDGBogoFaL XVGL/7ABLfD4aOMt8A1J18/DRvAsrN1NBBl1w+kDBj7zaUlLMYFb/q/nU3XMoN6/612t +Q9A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date; bh=TJxfIXr6cspYi9zlQ2r1Cx+T69xSTSDOqmME4xyEW4k=; fh=y46xphR+PVQU6SaLWlUF61SWDP96QJyybi+mWwHgCbM=; b=kbCZk38AebAcP+AMj3v/i7rFYpq1FmsZbwJULFQ5znlummPCXEgJPB0e94KoRWnN9y yXkM/+mQHTtbHKtDdGAi2c5X3bzgVPOEMcpTNVoaHvAeNblXaNZ2lAOTSrk/bYIBLkRY w9VYXyBSO1+4wk4eiYpR1XMRL1KzPAlD6MkBoyKLbyyTm5bfbY1aXpBC1rKva2NpfnPd TiLLUoiOYDdFD0sc226NlCWP8Xp5cJhsLNpaDbowt0p4FRVW4az1PPShugGyUmJSfsy2 QkIHq7cnW0kD0e6sKSVFdogE5XZELuZJzNG/N0yGmsSVKbmJHa8lbiahb9exP60ZHvCm paSg== 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id 23-20020a631057000000b0054fdfd26dffsi10677216pgq.337.2023.08.02.05.15.16; Wed, 02 Aug 2023 05:15:29 -0700 (PDT) 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234252AbjHBLpc (ORCPT + 99 others); Wed, 2 Aug 2023 07:45:32 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60758 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230057AbjHBLpb (ORCPT ); Wed, 2 Aug 2023 07:45:31 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 83DA2213D; Wed, 2 Aug 2023 04:45:29 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 1A0BB61939; Wed, 2 Aug 2023 11:45:29 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id D124DC433C8; Wed, 2 Aug 2023 11:45:27 +0000 (UTC) Date: Wed, 2 Aug 2023 07:45:26 -0400 From: Steven Rostedt To: Vincent Donnefort Cc: mhiramat@kernel.org, linux-kernel@vger.kernel.org, linux-trace-kernel@vger.kernel.org, kernel-team@android.com Subject: Re: [PATCH v5 1/2] ring-buffer: Introducing ring-buffer mapping functions Message-ID: <20230802074526.2fa479ab@gandalf.local.home> In-Reply-To: <20230801132603.0b18c0eb@gandalf.local.home> References: <20230728164754.460767-1-vdonnefort@google.com> <20230728164754.460767-2-vdonnefort@google.com> <20230801132603.0b18c0eb@gandalf.local.home> X-Mailer: Claws Mail 3.19.1 (GTK+ 2.24.33; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-1.7 required=5.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,RCVD_IN_DNSWL_BLOCKED,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 On Tue, 1 Aug 2023 13:26:03 -0400 Steven Rostedt wrote: > > + > > + if (READ_ONCE(cpu_buffer->mapped)) { > > + /* Ensure the meta_page is ready */ > > + smp_rmb(); > > + WRITE_ONCE(cpu_buffer->meta_page->pages_touched, > > + local_read(&cpu_buffer->pages_touched)); > > + } > > I was thinking instead of doing this in the semi fast path, put this logic > into the rb_wakeup_waiters() code. That is, if a task is mapped, we call > the irq_work() to do this for us. It could even do more, like handle > blocked mapped waiters. I was thinking how to implement this, and I worry that it may cause an irq storm. Let's keep this (and the other locations) as is, where we do the updates in place. Then we can look at seeing if it is possible to do it in a delayed fashion another time. -- Steve