From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 5DF71C433EF for ; Fri, 17 Dec 2021 08:00:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=nYM+rhmQ1yFw/IIe/pewFaNKU7OI/u4wQF7T+AAAQkE=; b=zermRldejDnuZs nLcnW3EJrsnHJntj/YVRaYFT5Vf/Fe4u0ZHpsgKtyMpnZnpZp3XmmYsAiVkgVNvbJdVs+wM5zCoR1 eab3GKPmnSg5Gkq07qA3NV6+oxootzwwf43stW+K+LMRm9FItZFS/DXWNh1PyioPl4Jzz8BZ/3SJK 4CEnFEU0R6SFS5/ARtwHhgj0rVCq8wr6ho/H29jrnJDkKG9sUQTcGJ/u73Ox/5W5kdhQTVqudumM1 WcQcdENf6FN8Izny5G93Cj0tD5+j9s6+uy92idLLTHiyTwdu0Zl80hXLkeIswgtRamDksKmEblUQn /0+8hx7pqgNz8PSm2RsQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1my88t-008wed-OP; Fri, 17 Dec 2021 07:59:03 +0000 Received: from mail-pj1-x1032.google.com ([2607:f8b0:4864:20::1032]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1my88q-008wdn-1N for linux-arm-kernel@lists.infradead.org; Fri, 17 Dec 2021 07:59:01 +0000 Received: by mail-pj1-x1032.google.com with SMTP id mj19so1528122pjb.3 for ; Thu, 16 Dec 2021 23:58:59 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=eefAs3uL+WsP/rtSEU8dzklWrmIu4i6QjwBqLTZ/hfY=; b=QO3SKqr3s85NIH6folKr6ARjtdn0FpcSWxAjYQ8Kf1ArQ9TkSxAnPeIJ7krpgXH2T3 BKDPoIyntL67rtMaKjxle/N47TRbO8CqZmNRgIncJ0MWqfgm7lFSYl17Du/cczt2GIRL BQylFmGXml80PFh3D54WALi1dRHYdIjI6v12GzeZvvkOPNlrMVHA03AfDreIPLzSuUOL hqyZNLmMOeDrcP1fOfJ/PgLRP/tpqUWNZ9haCKNd/w1JFcoYCdtsPl3OjT+a3ENT7YXG foY3G/Z4T2lOUmOg80dXjexkbVim7u1HvMRXHrHBhmOpMknudR31X4dvYoAbPo4USPys akpQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=eefAs3uL+WsP/rtSEU8dzklWrmIu4i6QjwBqLTZ/hfY=; b=CwlI9bLprKXkr3VvAtGOzXtRfZQM/ig72/PXu3L4wVVJb+mjJVi6Tkg/Jlbrk22H9s 94DwkwiWPxSdiulm1E4QlKRC2EMvlQH4c2OSpry1KZ/MnU1xBa6xN7WlfCFrn6LURIFK cT+G9z69EG/8WsVyondb+6KUP9hsZQGLbVE9Xf0cmWTHld5ixtAc1RIgv2TOoowAz2mW UwuCm9HW+meKJDu8EEt3hqSDPJFo5ldWhp2jzrh+RC/7oZGMh7dpHTArixE4RXClj2/T Alv5WPXNlv5m6VwsSAkIaGWVqwDZAeC4aPWWocMjzN3VU9f8/hD6OddwpU9AKz9WOAvH Tjaw== X-Gm-Message-State: AOAM532pAVZfnvgAQJfrwfkGTjXdS/lfig4eQrL0DGLeyLFvFfxuhP96 9wN/uXptdsntRIxtRg6N54N3aQ== X-Google-Smtp-Source: ABdhPJxrzU37n52OwF5xrWjQsktvMG10nV6vo8UF0tY2+s1bHeuacDCJcm1DJJtgW2C8aC2i8PoCvA== X-Received: by 2002:a17:902:8346:b0:148:b843:751a with SMTP id z6-20020a170902834600b00148b843751amr1887639pln.141.1639727939034; Thu, 16 Dec 2021 23:58:59 -0800 (PST) Received: from leoy-ThinkPad-X240s ([204.124.181.134]) by smtp.gmail.com with ESMTPSA id w16sm7674003pgh.81.2021.12.16.23.58.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 16 Dec 2021 23:58:58 -0800 (PST) Date: Fri, 17 Dec 2021 15:58:50 +0800 From: Leo Yan To: Catalin Marinas Cc: Kees Cook , Will Deacon , Mark Rutland , Ard Biesheuvel , Sami Tolvanen , Nicholas Piggin , James Morse , Marc Zyngier , Joey Gouly , Peter Collingbourne , Vincenzo Frascino , "Peter Zijlstra (Intel)" , Stephane Eranian , James Clark , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: Re: [RFCv1 4/4] perf: arm_spe: Dynamically switch PID tracing to contextidr Message-ID: <20211217075850.GC371207@leoy-ThinkPad-X240s> References: <20211021134530.206216-1-leo.yan@linaro.org> <20211021134530.206216-5-leo.yan@linaro.org> <202110210848.35971643C6@keescook> <20211101152835.GB375622@leoy-ThinkPad-X240s> <20211205135103.GA42658@leoy-ThinkPad-X240s> <20211207123118.GA255238@leoy-ThinkPad-X240s> <20211210075918.GD622826@leoy-ThinkPad-X240s> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20211210075918.GD622826@leoy-ThinkPad-X240s> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20211216_235900_114726_72423D3F X-CRM114-Status: GOOD ( 13.86 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Fri, Dec 10, 2021 at 03:59:18PM +0800, Leo Yan wrote: [...] > > You could also check there if the PID is in the root > > namespace and avoid setting CONTEXTIDR (or write 0). > > This could introduce mess. Writing 0 can lead the decoder to take it > as idle thread; if skip setting CONTEXTIDR, the tracer might use a > stale stale PID number (the previous one ID number). > > Alternatively, if you accept to always set PID to CONTEXTIDR in > contextidr_thread_switch(), it would be fine for me and we can only > need to control PID packets in SPE and CoreSight drivers. > > Please let me know your opinion, thanks! Gentle ping, Catalin. If anything is blur and you want me to clarify, please let me know. Sorry if you are in holiday and if so we can delay after holiday. Thanks, Leo _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel