Received: by 2002:ab2:710b:0:b0:1ef:a325:1205 with SMTP id z11csp19739lql; Sun, 10 Mar 2024 11:36:51 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUVjVOiLOPmb23KMEH8DvgelDvIXnpzxckFxYE2kBpCsUO/3Jj9craTG6sNz1GGIjCGso8ac5N54ODrEZSIFrwXfPj5xL2if0wz1Eyx1Q== X-Google-Smtp-Source: AGHT+IHqMQJY3klmtmB0Q5/M3kK646wwx8LEffAayiw55+A2SriqSTQUHMopvrogT03AVi9+broM X-Received: by 2002:aa7:888a:0:b0:6e4:fddf:c1d9 with SMTP id z10-20020aa7888a000000b006e4fddfc1d9mr4880525pfe.27.1710095811303; Sun, 10 Mar 2024 11:36:51 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1710095811; cv=pass; d=google.com; s=arc-20160816; b=Ri5n5yvSUFbIMFPimOgZkKsWSykpdWj4Q+MPa7IjrrAKobt8Ui+0GYaUFURJ0YNTEM Ss68ymy37E7Z36HJYGHzckqZnJkmkdmELC5ZUr1INW68z4X8GqiT+fI7Sl8cMVa997Yc Fv0UQB7jHf04j66wtGbTR6Omk4iKYiiQ5STR9dw+CuXbTlqdalnx9v4UE0qBneMamZOH KNO6+eVTQf9Yti4mMTDANCVqSbZlpRomGNCVS4n7p6ClNzOelB6B2rtF34g87MDoTa2R jTNaVhIHiDTWvQN0B1rYooCR5FZu+fWi6/iO3M5cC7SfVbtawrH9dPbF4ktwMs9ZGwWA nKnw== 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=8KYvYSGbL608pzPw7/cIx7E75goMXm5nwJZzYAdj6L0=; fh=wXo4yDJRZDgyBBaWEN6Cfg5iOu61CkOXg9B5oUDlBlg=; b=0sTuyRhR+Q/B4O4thrudPkqHBt+UrhhtS66NgqPMXEtuHAR8gGhZDYhhsymjJWsaDr g3H8yx9GZIZb9q2e1TZf2dKHajUFSB4rvlnPghK/SOiXMmbYawLZqPA0m8ljOpjUtijS M2pHQZeS0ihFn+9co0OL0LGicVDzfFO2Zf2JTIqvZ80+ZKKZQLkSUb4ay9sYmxyTni7E urnLwfwIF6Ud/j4j5B4TdvLPzL9GZtP2z8BuhGXd2jkTdfWR8IwFBFJnxybb90ZQ5aVm qqDpoAqMtoLKf0bxdfd6KgkXRKOBUK/prmc15ep1suBklUKbpxajRZOBY99tqJiyzHx0 rvww==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1); spf=pass (google.com: domain of linux-kernel+bounces-98296-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-98296-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id e16-20020a630f10000000b005dbec216167si3329874pgl.614.2024.03.10.11.36.51 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 10 Mar 2024 11:36:51 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-98296-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; arc=pass (i=1); spf=pass (google.com: domain of linux-kernel+bounces-98296-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-98296-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 sv.mirrors.kernel.org (Postfix) with ESMTPS id 01BD02813AB for ; Sun, 10 Mar 2024 18:36:51 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id E3F0739AFF; Sun, 10 Mar 2024 18:36:43 +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 7006C39AD5 for ; Sun, 10 Mar 2024 18:36:43 +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=1710095803; cv=none; b=pusTRepabVzE2xWHoXn5DDmenF+d4gq1ABA04/t9SgBbtHBGzNBmevqOrrALXKSydFUzFcjrFqcbyv4V01gmn0Rp3J9wcHmbL/y72pub+miBKC7JH7J7CO6ByFIxKTeRpxtbSv9I1/MCHZds1Brjwde+djEhYGQu0jPP5zbPfMY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710095803; c=relaxed/simple; bh=BExo0rP+W8uEQed6H6W4rt613GfDykdsivkK43c3Yiw=; h=Date:From:To:Cc:Subject:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=XdQA3gkQc38pIAwRJ3jBP97LlPXh6ymErypjfJvxeojOA93XMO8mBTcU8HAKjkUX4B++DsSCvEYqD1g/tmV/PT/Zx77CJOa5ZpzvZJ9pXPbtYVed/9CjkVNNqNNtE0vpoM+NGiE1EIHym29gEiPRMMQFSHYOSM08vifw3R8fReI= 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 1C853C433F1; Sun, 10 Mar 2024 18:36:42 +0000 (UTC) Date: Sun, 10 Mar 2024 14:36:40 -0400 From: Steven Rostedt To: David Laight Cc: "linux-kernel@vger.kernel.org" , Masami Hiramatsu , Mark Rutland , Mathieu Desnoyers , Andrew Morton Subject: Re: [for-linus][PATCH 0/3] tracing: Fixes for v6.8 Message-ID: <20240310143640.3feb907b@rorschach.local.home> In-Reply-To: <550b6c44aa434b5b91e999a8d073527c@AcuMS.aculab.com> References: <20240306184244.754263547@goodmis.org> <550b6c44aa434b5b91e999a8d073527c@AcuMS.aculab.com> X-Mailer: Claws Mail 3.17.8 (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=US-ASCII Content-Transfer-Encoding: 7bit On Sun, 10 Mar 2024 18:16:06 +0000 David Laight wrote: > ... > > Another issue that was brought up is that the trace_seq buffer is > > also based on PAGE_SIZE even though it is not tied to the architecture > > limit like the ring buffer sub-buffer is. Having it be 64K * 2 is > > simply just too big and wasting memory on systems with 64K page sizes. > > It is now hardcoded to 8K which is what all other architectures with > > 4K PAGE_SIZE has. > > Does Linux use a 2k PAGE_SIZE on any architectures? > IIRC m68k hardware has a 2k page, but Linux might always pair them. > A 2k page might (or might not) cause grief. > The trace_seq is just a buffer to build up the event output string. The ring buffer sub-buffer is set to page size. For trace_marker, it is still limited to the size of the ring buffer sub-buffer. If the sub-buffer is only 2K, the trace_marker write will be broken up by less than 2K. The problem that is being fixed here had nothing to do with the limited size of the resources. The issue was actually the opposite. On PowerPC, the PAGE_SIZE being 64K allowed the strings to be that big too. And what broke was that it was passed to a vsprintf(s, "%.*s", len, str); where the len was greater than 32K and that caused a warning as the precision of "%.*s" has a max of signed short. 2K PAGE_SIZE will still just "work". -- Steve