Received: by 2002:ab2:6a05:0:b0:1f8:1780:a4ed with SMTP id w5csp2198901lqo; Mon, 13 May 2024 10:31:55 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWB5BANOqGBBFTV1RI40N6o+hTlw6F3cQeBIyjPTUefXljauecbWI3PR3g5j7/oVUlpgpzZZV2U3BzE64qgG/bBE94uYYp/9XuxDvT4KA== X-Google-Smtp-Source: AGHT+IHZFQwFtfTx5GsSYLUxbdtgNQ7ZFHUaWhjxn81fjFllVuh7oT/Hn/Hu82HL6EYTPcS7MNGq X-Received: by 2002:a05:6a20:914f:b0:1a8:2cc0:290a with SMTP id adf61e73a8af0-1afde0dc8bcmr11158487637.30.1715621515204; Mon, 13 May 2024 10:31:55 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1715621515; cv=pass; d=google.com; s=arc-20160816; b=fEyHe5OxnorC7FQtAZnGk6XL1bkUFnNn6DqftYttAMh6IRAuaeRSDdb54NjMQd94l+ IHnefwhP6y/JqgJ5puyoL2jEV9La0Aci7HsSrPNeR8hvhiilzdSdGuRYurQ+LNunx2Kk F3k1ye2p7p150cL/7pG3RKI7bTgpiBUVQbUUyrO+FsklUB962uKSf38hF9HcwgDbi66F dW0yjs3ZVa0tFizuOhB29a2trkZRSY3GkksCX/jss3WMgn90qbqXt2c/Hzv6/5DTOMCA bWM1Gqwz5lJBpejnELM16UCAXRBmYef+OR3ynhqd6jzHLacsW+cPiSHokuevr593UIKD CBMQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature:dkim-signature; bh=sWsm72q9eu1VHpbY+LKUmMDUatEzX8mREe9jVdywOgo=; fh=o376GdE5v32g3JUIy5O/4c3f4Pz+ZuHhnwWiAsMMgME=; b=Im+Y2iKeaT3ErWz7L+0ySSQOiMHC2/4v1YW4SuwAqMLdjjjXaPNtMqEhmZxJRiSOy6 kFIoLTIuBTRaMib32M+ySehKno/bq9FmkN8EqzJl9vmVfCdwCytHXTHtSOq4jOOTCv77 ZO2yn25wqzea3RITHxRRr/eoI+hZBzfVk4vrNz4QU+6/vE0zNT6B3G+KZig4ubrMroSM kPTa2oNoP8r1nJi2hVXpRFoB0mCnibPSdAxc7gvJKSxaW3UxfMqAmullqqNZG59TxZcA 5mf1ONF+nIaj2aVFYZoyM4+T5lcKXzEDYzlcaUmWf04EiV9skti+htbsQ8suU72U0EqI OVqA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@suse.com header.s=susede1 header.b=RoBd39bG; dkim=pass header.i=@suse.com header.s=susede1 header.b=RoBd39bG; arc=pass (i=1 spf=pass spfdomain=suse.com dkim=pass dkdomain=suse.com dkim=pass dkdomain=suse.com dmarc=pass fromdomain=suse.com); spf=pass (google.com: domain of linux-kernel+bounces-177905-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-177905-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=suse.com Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id d2e1a72fcca58-6f4d2aefa29si9710487b3a.209.2024.05.13.10.31.54 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 13 May 2024 10:31:55 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-177905-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@suse.com header.s=susede1 header.b=RoBd39bG; dkim=pass header.i=@suse.com header.s=susede1 header.b=RoBd39bG; arc=pass (i=1 spf=pass spfdomain=suse.com dkim=pass dkdomain=suse.com dkim=pass dkdomain=suse.com dmarc=pass fromdomain=suse.com); spf=pass (google.com: domain of linux-kernel+bounces-177905-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-177905-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=suse.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id C74E1287CD6 for ; Mon, 13 May 2024 17:30:59 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 8E8312135A; Mon, 13 May 2024 17:30:54 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=suse.com header.i=@suse.com header.b="RoBd39bG"; dkim=pass (1024-bit key) header.d=suse.com header.i=@suse.com header.b="RoBd39bG" Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.223.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 33CB120DF7; Mon, 13 May 2024 17:30:52 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=195.135.223.131 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715621453; cv=none; b=Pbrs7njxqDX8Kd3gsyUgnOLa8HXhnNTymeyjiq8+cxWCDzZfyBcCzxOye14s1pKJBvepz0ENrufoOgi246UC1kAmCnKpoBNax71dDc4TsqvFwel3byPJKo1MR7woZvBTgqM9HIVudHaOWkrdpepGOwli1rczbF64PWl/rQRSPv0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715621453; c=relaxed/simple; bh=dEWpL73/G3L/agPWxFvIClOdCN8Npjgde9rmhlcynwA=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=bDO1w3mNSKwh5h7JykuEZz/BEN7o4eXKc+MVw2KaSRgYIzFzVxPcz0n+4l7MBqZDDZytHkeVUOUe+JrHWbjfnuztc3DRyNplHm2taC9DWcKfmzongw9txmTsYhL2l13vl6ayMi2eAn5xaGpQjuY6Xqsle/rVepHMnccbbKsZUVE= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=suse.com; spf=pass smtp.mailfrom=suse.com; dkim=pass (1024-bit key) header.d=suse.com header.i=@suse.com header.b=RoBd39bG; dkim=pass (1024-bit key) header.d=suse.com header.i=@suse.com header.b=RoBd39bG; arc=none smtp.client-ip=195.135.223.131 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=suse.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=suse.com 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-out2.suse.de (Postfix) with ESMTPS id 5AC7D5C894; Mon, 13 May 2024 17:30:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1715621450; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=sWsm72q9eu1VHpbY+LKUmMDUatEzX8mREe9jVdywOgo=; b=RoBd39bGPLdW8lDwy9ojb/qIWoGNIaP2brQwHgE5+r0Tz0IC3fHId030WMbGXTYgD4vuIn ip0rzwoQaBs0AJ4hC1QIqxlxucjEobRC/EqdFPKqAKcr4Y5Oba74V9wACXrsi8yGMMdFDE PnIl82KbGP3ENnQA45h0F2zzi7/LLbg= Authentication-Results: smtp-out2.suse.de; dkim=pass header.d=suse.com header.s=susede1 header.b=RoBd39bG DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1715621450; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=sWsm72q9eu1VHpbY+LKUmMDUatEzX8mREe9jVdywOgo=; b=RoBd39bGPLdW8lDwy9ojb/qIWoGNIaP2brQwHgE5+r0Tz0IC3fHId030WMbGXTYgD4vuIn ip0rzwoQaBs0AJ4hC1QIqxlxucjEobRC/EqdFPKqAKcr4Y5Oba74V9wACXrsi8yGMMdFDE PnIl82KbGP3ENnQA45h0F2zzi7/LLbg= 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 4372313A52; Mon, 13 May 2024 17:30:50 +0000 (UTC) Received: from dovecot-director2.suse.de ([2a07:de40:b281:106:10:150:64:167]) by imap1.dmz-prg2.suse.org with ESMTPSA id yPoQEEpOQmbMdQAAD6G6ig (envelope-from ); Mon, 13 May 2024 17:30:50 +0000 Date: Mon, 13 May 2024 19:30:49 +0200 From: Michal =?utf-8?Q?Koutn=C3=BD?= To: Steven Rostedt Cc: linux-kernel@vger.kernel.org, linux-trace-kernel@vger.kernel.org, Masami Hiramatsu , Mathieu Desnoyers , Christian Brauner , Oleg Nesterov , Kent Overstreet , Kees Cook , Andrew Morton , Tycho Andersen , Jens Axboe , Aleksa Sarai Subject: Re: [PATCH 1/3] tracing: Remove dependency of saved_cmdlines_buffer on PID_MAX_DEFAULT Message-ID: References: <20240408145819.8787-1-mkoutny@suse.com> <20240408145819.8787-2-mkoutny@suse.com> <20240409110126.651e94cb@gandalf.local.home> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="zkpfq5nfsruo2pew" Content-Disposition: inline In-Reply-To: <20240409110126.651e94cb@gandalf.local.home> X-Spam-Flag: NO X-Spam-Score: -7.97 X-Rspamd-Action: no action X-Rspamd-Queue-Id: 5AC7D5C894 X-Spam-Level: X-Rspamd-Server: rspamd2.dmz-prg2.suse.org X-Spamd-Result: default: False [-7.97 / 50.00]; BAYES_HAM(-2.86)[99.38%]; SIGNED_PGP(-2.00)[]; DWL_DNSWL_MED(-2.00)[suse.com:dkim]; NEURAL_HAM_LONG(-1.00)[-1.000]; MID_RHS_NOT_FQDN(0.50)[]; MIME_GOOD(-0.20)[multipart/signed,text/plain]; R_DKIM_ALLOW(-0.20)[suse.com:s=susede1]; NEURAL_HAM_SHORT(-0.20)[-1.000]; MX_GOOD(-0.01)[]; DKIM_SIGNED(0.00)[suse.com:s=susede1]; ARC_NA(0.00)[]; RCPT_COUNT_TWELVE(0.00)[13]; FUZZY_BLOCKED(0.00)[rspamd.com]; MIME_TRACE(0.00)[0:+,1:+,2:~]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; RCVD_COUNT_TWO(0.00)[2]; FROM_EQ_ENVFROM(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; DKIM_TRACE(0.00)[suse.com:+]; MISSING_XM_UA(0.00)[]; RCVD_TLS_ALL(0.00)[]; DBL_BLOCKED_OPENRESOLVER(0.00)[imap1.dmz-prg2.suse.org:helo,imap1.dmz-prg2.suse.org:rdns,suse.com:dkim] --zkpfq5nfsruo2pew Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Apr 09, 2024 at 11:01:26AM GMT, Steven Rostedt wrote: > > - tpid =3D pid & (PID_MAX_DEFAULT - 1); > > + tpid =3D pid % PID_MAP_SIZE; >=20 > Does that compile to the same? This is a fast path. I didn't check. If fast is the intetion, I would change it to something like BUILD_BUG_ON(!(PID_MAP_SIZE % 2)) and keep the bit operation without reliance on compiler optimizations. Thanks for the response (I may not follow up on this single commit though). Michal --zkpfq5nfsruo2pew Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iHUEABYKAB0WIQQpEWyjXuwGT2dDBqAGvrMr/1gcjgUCZkJORwAKCRAGvrMr/1gc juwFAQDBe2s/17ASgBrvfEF2JeszX6QHNDTWC+passHlgM1YEwEAscayN2Es6GV6 HNEqE1pw+AK/Y3sC+HqlfsWgHQRpZQY= =GZFY -----END PGP SIGNATURE----- --zkpfq5nfsruo2pew--