Received: by 2002:ab2:3350:0:b0:1f4:6588:b3a7 with SMTP id o16csp2071266lqe; Tue, 9 Apr 2024 08:46:27 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWuh6GkEvoeh+uqdVCzDYbzXsIBZrrroRRwy6M6gyY+kFp+KWxRS+bNaqmc8gQEpt+p9WQP7OGFYRrHFcmKHvrLfP9MyBOClWAqRrazxA== X-Google-Smtp-Source: AGHT+IG0qwSQDTHvyorWRS58EsHmakDSPyKl9NFK3bRhByfCb0FK9oJ2d1+37cYKpJaoI3lFQ+9w X-Received: by 2002:a05:6a20:d49a:b0:1a7:35b1:1894 with SMTP id im26-20020a056a20d49a00b001a735b11894mr232508pzb.32.1712677586637; Tue, 09 Apr 2024 08:46:26 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1712677586; cv=pass; d=google.com; s=arc-20160816; b=pRnaRQx7Pu0IAz/fjxyFsqDTMCuEoJ2gBQQyo+jXXmxPKJixv/kzQE8K/zC7X2IFxz OJGkliR56qYUTq4mA7xDqXrjjm9dllQwhYi8vd5/cww9TqjG6u5I/lv2vxITs2YGt4Og /Aff731alK7Fe6XPDbUr3/WsqTIO9yZ+rnLmotOa7UdoX7Cu+xGWnA+EqJgmFzIIewTk jz4bi5UN35xHiaebHaNoRS3c6XnKy0RkCZNPa6AciLHUDFG7AOugOZXH36dqCMqrf1+D nXz1FhV9/NVCzlY/qtKyju+jbWmpYk7xPHSGqb0F7mfZIA16c72c68ouNAonxukMai9X 7n6w== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :subject:cc:to:from:date; bh=Ihg6hu585AYBz0zo0+F4JqvQo2RJmUTAiaaUJXltuUA=; fh=4OjaLBXIODzszZtpr5WcJkw9zJkhgfVHWWOodC43nTE=; b=dtpxEEvn0iVxgQntii7yuU6lu5Ub/eGykH7yifIMDmFjp4kj1L+IGemuG9NnyYgXbB cAdd74bqgVi8AiRQBCTmTTLWTAduh3vApCiGWNWb6cmFRvkgUqGsxRVcsY93jmM+lAT4 VQva5DAaL1B/GhkGscPzYeW7+pwyJITtWzV96Dn2Q1FSjXFLjtCdpk7xCPFuWu+Ss/M0 GXhvta5qn/rUai6ziBRmsAf0j+0B4VAnh0qmn9TG6omrLqG0CiNylqBHcdM+ET3lumUJ WOBBwhcIbw3Dw+0q4gwILE9o9t7zh5BX2FAb0FiYHrTb8nwROM6l29ARmYqckKvovpHi BM5A==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1); spf=pass (google.com: domain of linux-kernel+bounces-137139-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-137139-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id j5-20020a63ec05000000b005dccf9c08ebsi8792023pgh.656.2024.04.09.08.46.26 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 09 Apr 2024 08:46:26 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-137139-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; arc=pass (i=1); spf=pass (google.com: domain of linux-kernel+bounces-137139-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-137139-linux.lists.archive=gmail.com@vger.kernel.org" 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 sy.mirrors.kernel.org (Postfix) with ESMTPS id 96D18B22419 for ; Tue, 9 Apr 2024 14:59:00 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 572D012FF72; Tue, 9 Apr 2024 14:58:54 +0000 (UTC) Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id BC86685276; Tue, 9 Apr 2024 14:58:53 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712674733; cv=none; b=Jv06jEx6oeTzCR0A014YJ2xFrREbsHV3CTsrEbGr2EIG5+aEnIqee0iecEnG5qN9JRxERzlBOziMmJkHRqkfvQK8h3vowNLtq9MRZ6vbD369FfR5K+DMhcDthh2C6E1TmqwoK7DOXXuZwz/qYmrXA79HWSyen61sDM1/S33B5ow= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712674733; c=relaxed/simple; bh=wGwVQPo5a62UbnM0Pfv8vXp1bEYX3+DG+IPrfybv2w8=; h=Date:From:To:Cc:Subject:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=rwVViOyIDbjjzGdlx2eTmn98/qbKyTCuRfJfo8dGXPatkArpDLqZ0Lz+DwIs7xGBksJtxPZgX4XES+vFUf3ZJf+QAMzBW11DSa27w06igKawH3fxgTWWfndy3gZGJ6z3UkB1i0DMGeAD0UIPVZIjSwn81hdGREKA9jKLB17kks8= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id E417AC433C7; Tue, 9 Apr 2024 14:58:51 +0000 (UTC) Date: Tue, 9 Apr 2024 11:01:26 -0400 From: Steven Rostedt To: Michal =?UTF-8?B?S291dG7DvQ==?= 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: <20240409110126.651e94cb@gandalf.local.home> In-Reply-To: <20240408145819.8787-2-mkoutny@suse.com> References: <20240408145819.8787-1-mkoutny@suse.com> <20240408145819.8787-2-mkoutny@suse.com> X-Mailer: Claws Mail 3.19.1 (GTK+ 2.24.33; x86_64-pc-linux-gnu) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On Mon, 8 Apr 2024 16:58:17 +0200 Michal Koutn=C3=BD wrote: > @@ -294,7 +295,7 @@ static void __trace_find_cmdline(int pid, char comm[]) > return; > } > =20 > - tpid =3D pid & (PID_MAX_DEFAULT - 1); > + tpid =3D pid % PID_MAP_SIZE; Does that compile to the same? This is a fast path. -- Steve > map =3D savedcmd->map_pid_to_cmdline[tpid]; > if (map !=3D NO_CMDLINE_MAP) { > tpid =3D savedcmd->map_cmdline_to_pid[map];