Received: by 2002:a25:824b:0:0:0:0:0 with SMTP id d11csp1138834ybn; Wed, 2 Oct 2019 11:24:06 -0700 (PDT) X-Google-Smtp-Source: APXvYqxJRewFWoyX/1ag7KKP72YRbg5rOzegqsf0qayUvuzIjZh6T9PNlWS0PHuMkPo+cEeACoCo X-Received: by 2002:a17:906:2a86:: with SMTP id l6mr4186435eje.120.1570040646614; Wed, 02 Oct 2019 11:24:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1570040646; cv=none; d=google.com; s=arc-20160816; b=gGGl4x2TfcbfNknu0kCqgtWeJi25wpHi1I8tbvo3r3EiLyyPQMKCTumkZ8wwrCnrWL c+Va68dhwzOj6Ik539fu6XioFBkSUIRQFJVOCKH+4y8BKne4swAcpzRlx0lTL8lY2d+O 6DpoGO/vdhS1ktY5spGsaD/SWnW9JDfxfVQfGWXqXyjTcV7JafhdlLDyPaVulGzZUx+I SSqqOFV4rfI2odtaiWWZNwADs3Y5gdwkK//Gl72osHg1kzVgtZzr6VYeEfvkGiOvOlyG KJSrboJnfV/Ki/dKnYJK5DIF4LFa7URanWweOZChJHWaTwSIc2fDon5mA5qa2eV8R0v0 V2dg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=tV4F6QlszFFgcHGHREIAUvHx1CffhZaSy+HMTK3Mt0Q=; b=m5pIxxQvCGCm5FSDKq/iFpR31CF+DP1kuKgivnTr/LVbnAZnyk5H505MJ7t+kNxAPT xxz9N3BEyVdgdPRaLTzAVmU4QDxS6kOx0Xaxji+mVTbxh+C1z13P5UBhgJKMvmEUapCy N1Y4PsdBcc0p+DHlX/PT7f1rJWsl7eN1q0r8yTP4zrvA5Yfyxa15IOMBcii6yZxu5Mh7 4/Y7m8F1wUCaF76LGgrz0Wt4zwRl+xa0FSxpjaWoCebDs8iwb7ZQFiXz7kSuYy5SjZLQ BHte3wi1+KxZ/Z1y4vVjjOkokK2hfrxNeB+niGDODE/5c4YAXFqB3GjwolC+SsXdsmUN o/8w== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=jfMvq2pQ; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b22si12378229eda.194.2019.10.02.11.23.42; Wed, 02 Oct 2019 11:24:06 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=jfMvq2pQ; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728545AbfJBSVR (ORCPT + 99 others); Wed, 2 Oct 2019 14:21:17 -0400 Received: from bombadil.infradead.org ([198.137.202.133]:53144 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726708AbfJBSVR (ORCPT ); Wed, 2 Oct 2019 14:21:17 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20170209; h=In-Reply-To:Content-Type:MIME-Version :References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=tV4F6QlszFFgcHGHREIAUvHx1CffhZaSy+HMTK3Mt0Q=; b=jfMvq2pQAYsNkDUWwigv0rk0M +T/AACmOD6kQ+a4JYh9r8tdPQUNqua52dLBPSKRYWpTGflnYMLoeZrl9PyKjnCxXCcwhrVXrqxXtz dRliVEKB37xKpkKtHqTusP1F5mmgLxRrrtVUZdxfQK5zaQ+jWp77u06x0zvYfWpZatYGcnSCYcxJ6 uef6lEvDI/tBrFx0r3QalXfvVhrNQC2J92FfS68NtIq+6FX8TH8jhO8H7Ig4XaA1nPzRZVfQuj0Ca dves+0EtHxJjAazVBomWOoYuFFhMeOPBTE05YQcokfW4KPnX8MPrX07fUhh2cA/4QTwDEadUeiZQp 1GJe+oWpw==; Received: from j217100.upc-j.chello.nl ([24.132.217.100] helo=worktop.programming.kicks-ass.net) by bombadil.infradead.org with esmtpsa (Exim 4.92.2 #3 (Red Hat Linux)) id 1iFjFO-0000tg-FG; Wed, 02 Oct 2019 18:21:10 +0000 Received: by worktop.programming.kicks-ass.net (Postfix, from userid 1000) id 6F65B9801D6; Wed, 2 Oct 2019 20:21:06 +0200 (CEST) Date: Wed, 2 Oct 2019 20:21:06 +0200 From: Peter Zijlstra To: Daniel Bristot de Oliveira Cc: linux-kernel@vger.kernel.org, x86@kernel.org, Nadav Amit , Andy Lutomirski , Dave Hansen , Song Liu , Masami Hiramatsu , Steven Rostedt Subject: Re: [PATCH 3/3] x86/ftrace: Use text_poke() Message-ID: <20191002182106.GC4643@worktop.programming.kicks-ass.net> References: <20190827180622.159326993@infradead.org> <20190827181147.166658077@infradead.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Oct 02, 2019 at 06:35:26PM +0200, Daniel Bristot de Oliveira wrote: > ftrace was already batching the updates, for instance, causing 3 IPIs to enable > all functions. The text_poke() batching also works. But because of the limited > buffer [ see the reply to the patch 2/3 ], it is flushing the buffer during the > operation, causing more IPIs than the previous code. Using the 5.4-rc1 in a VM, > when enabling the function tracer, I see 250+ intermediate text_poke_finish() > because of a full buffer... > > Would this be the case of trying to use a dynamically allocated buffer? > > Thoughts? Is it a problem? I tried growing the buffer (IIRC I made it 10 times bigger) and didn't see any performance improvements because of it.