From patchwork Tue Dec 5 16:17:33 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Petr Pavlu X-Patchwork-Id: 17578 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:bcd1:0:b0:403:3b70:6f57 with SMTP id r17csp3541945vqy; Tue, 5 Dec 2023 08:18:09 -0800 (PST) X-Google-Smtp-Source: AGHT+IHoFBztKjJdyUZqZCG/Yn8WZ9A83043yL4u36OsQcErImGuwZE/uZR/Oi+GRBfuKC8wxuA0 X-Received: by 2002:a05:6358:63a2:b0:16d:bd00:3d61 with SMTP id k34-20020a05635863a200b0016dbd003d61mr3354407rwh.23.1701793088656; Tue, 05 Dec 2023 08:18:08 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701793088; cv=none; d=google.com; s=arc-20160816; b=tEsqACv9CtPTNsWZLIyi+uhxABFeoGC3AcTRNkZ7RmafmIrNiknlp4SHSq7vj7NtKq f55I4y8rtFGqbuKjNOxMylRxics/KX/0ybO05EdaW6IeNW7xuRH1vqnKX2bfOa7v9dbr Mfmei8fJ01lSkXXfhnRLwC7DYt8vTrHXw0PAFIIq4V0zaefiHmpMPeRowLR9inluujmT ZkD26UnkJPlYK1R+SOmJm5iwjT9pw3wN60YIlljKNSghLWe2/8CFVIHbb17mS7B3FvOs F0pGp2PuLTQa0I1/zho7opj9ysW2iSzYxPy6rG3aG2VAS95G9fBOyVPYB/bTAvY5R0l8 VR3Q== 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 :message-id:date:subject:cc:to:from; bh=1L4t6anl5jjPODDEfOSES34GIlHX4e0qoBUG3I6eOfo=; fh=j8Hw7lilfJM9L0BwDk5YbNksoIL60jpocmP7dOg/RPw=; b=j8r6mZRYpttCqPWFCnjsvuylI4KIyBYqpWGIMhx5y0Oa5Wsv/vk2XhZp6lvHvWeYqr E0E2JVyD1sIUMR5duL4kmA+isCFpInXJPx+ae/6KVsQ4UZGhsleViPoRPWi3SRNPvB34 GgHx+ryTrapO6JyvlTSbkIkoq9ilxxKFIe4L+TRla8O+ti69zMu38uyy31Df7ov7BhZ8 kdRL5J5qA42GIbvKd5k8Gf4P/m1F7LDdwS8MOlJRT0rxFUjYl3xQDHM0COouZjH/l3Pt XFn7DcWl83x5A/YxnNJGi2SWfLl2aiSHP0oFSIHt2GkrMztujrWsCpz2VkZzVp6Ov8PY bf7w== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=suse.com Received: from howler.vger.email (howler.vger.email. [2620:137:e000::3:4]) by mx.google.com with ESMTPS id q63-20020a634342000000b005c252d169d7si9902532pga.704.2023.12.05.08.18.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 05 Dec 2023 08:18:08 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) client-ip=2620:137:e000::3:4; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=suse.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by howler.vger.email (Postfix) with ESMTP id B4A8F8247751; Tue, 5 Dec 2023 08:18:02 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at howler.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232039AbjLEQRw (ORCPT + 99 others); Tue, 5 Dec 2023 11:17:52 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37018 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232018AbjLEQRu (ORCPT ); Tue, 5 Dec 2023 11:17:50 -0500 Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.223.130]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CDE93129; Tue, 5 Dec 2023 08:17:55 -0800 (PST) Received: from imap1.dmz-prg2.suse.org (imap1.dmz-prg2.suse.org [IPv6:2a07:de40:b281:104:10:150:64:97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id E3E6621AA8; Tue, 5 Dec 2023 16:17:53 +0000 (UTC) Received: from imap1.dmz-prg2.suse.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by imap1.dmz-prg2.suse.org (Postfix) with ESMTPS id 9FEEF136CF; Tue, 5 Dec 2023 16:17:53 +0000 (UTC) Received: from dovecot-director2.suse.de ([10.150.64.162]) by imap1.dmz-prg2.suse.org with ESMTPSA id +1NJJTFNb2WtdwAAD6G6ig (envelope-from ); Tue, 05 Dec 2023 16:17:53 +0000 From: Petr Pavlu To: rostedt@goodmis.org, mhiramat@kernel.org, mathieu.desnoyers@efficios.com Cc: zhengyejian1@huawei.com, linux-trace-kernel@vger.kernel.org, linux-kernel@vger.kernel.org, Petr Pavlu Subject: [PATCH v2 0/3] tracing: Simplify and fix "buffered event" synchronization Date: Tue, 5 Dec 2023 17:17:33 +0100 Message-Id: <20231205161736.19663-1-petr.pavlu@suse.com> X-Mailer: git-send-email 2.35.3 MIME-Version: 1.0 X-Spam-Score: 15.00 X-Spamd-Result: default: False [15.00 / 50.00]; RCVD_VIA_SMTP_AUTH(0.00)[]; R_SPF_FAIL(1.00)[-all]; ARC_NA(0.00)[]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; R_MISSING_CHARSET(2.50)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MIME_GOOD(-0.10)[text/plain]; BROKEN_CONTENT_TYPE(1.50)[]; DMARC_POLICY_QUARANTINE(1.50)[suse.com : No valid SPF, No valid DKIM,quarantine]; RCVD_COUNT_THREE(0.00)[3]; MX_GOOD(-0.01)[]; NEURAL_HAM_SHORT(-0.18)[-0.910]; RCPT_COUNT_SEVEN(0.00)[7]; MID_CONTAINS_FROM(1.00)[]; FUZZY_BLOCKED(0.00)[rspamd.com]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; RCVD_TLS_ALL(0.00)[] X-Spamd-Bar: +++++++++++++++ X-Rspamd-Server: rspamd1 Authentication-Results: smtp-out1.suse.de; dkim=none; dmarc=fail reason="No valid SPF, No valid DKIM" header.from=suse.com (policy=quarantine); spf=fail (smtp-out1.suse.de: domain of petr.pavlu@suse.com does not designate 2a07:de40:b281:104:10:150:64:97 as permitted sender) smtp.mailfrom=petr.pavlu@suse.com X-Rspamd-Queue-Id: E3E6621AA8 X-Spam: Yes X-Spam-Status: No, score=-0.8 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on howler.vger.email 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 (howler.vger.email [0.0.0.0]); Tue, 05 Dec 2023 08:18:03 -0800 (PST) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1783730531906992376 X-GMAIL-MSGID: 1784459389917909434 Fix a few problems related to the maintenance of buffered events. Changes since v1 [1]: * Address found problems individually. The approach in v1 tried to simplify the buffered event synchronization but had performance issues. [1] https://lore.kernel.org/linux-trace-kernel/20231127151248.7232-1-petr.pavlu@suse.com/ Petr Pavlu (3): tracing: Fix incomplete locking when disabling buffered events tracing: Fix a warning when allocating buffered events fails tracing: Fix a possible race when disabling buffered events kernel/trace/trace.c | 35 +++++++++++++++++------------------ 1 file changed, 17 insertions(+), 18 deletions(-) base-commit: bee0e7762ad2c6025b9f5245c040fcc36ef2bde8