From mboxrd@z Thu Jan 1 00:00:00 1970 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 7866C28F7 for ; Wed, 24 Jul 2024 00:09:14 +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=1721779754; cv=none; b=K8Mn6UeoVrH5SEfk1CyNKrV/YIIOdaozMszApOBRzQvfg2PGyG3Mvb0rqXzAFmz6lDaFpRan67De8wMvZBfYMu8ytWnZcNaSc/YR9l9h0my4kzXOVBhFVyGz+w4DRM++t6xheo26AdkU5xFjVapdDIlMH8mxEeVTdM9RNB2TvdM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1721779754; c=relaxed/simple; bh=FTVVSpZk7VQoPlV50fSkq47XODk5/K3NfAmbZNp4/Pw=; h=Date:From:To:Cc:Subject:Message-Id:In-Reply-To:References: Mime-Version:Content-Type; b=KS4KoP9lBQSsZSwKJuKQCYpaFxNQiUzQQ5616DSu9Yz2AsozqvX3+mYvp8ow7z+yBSpF0I+v8TnzBq8f47aUobP8+K5uJ+XlGGhd3Dt7teTPpFreh0+1MTYZZJ3S8ebHw+Ibq0Md7iDE50byOCqZmnQ0HCs4ItTLkEdwrsVexmI= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux-foundation.org header.i=@linux-foundation.org header.b=OSHv8Grq; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux-foundation.org header.i=@linux-foundation.org header.b="OSHv8Grq" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 75D16C4AF0A; Wed, 24 Jul 2024 00:09:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linux-foundation.org; s=korg; t=1721779754; bh=FTVVSpZk7VQoPlV50fSkq47XODk5/K3NfAmbZNp4/Pw=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=OSHv8Grq83NHqLdImqmyr9oVCjKtVJCSDJgZuaaaxVRnznRa5hdFZfxSWOpUZ/6Es ZRe6pbJhm54VbdLQagrVB/HXuJb7NMM2br8zxUmmcL56Q46QiuR5IO8tc3vYi5xSfJ bM8GwDLxqhJb5ee11k0j+oYvGwRkwyqcg4aaBdNE= Date: Tue, 23 Jul 2024 17:09:13 -0700 From: Andrew Morton To: Shakeel Butt Cc: Pasha Tatashin , jpoimboe@kernel.org, kent.overstreet@linux.dev, peterz@infradead.org, nphamcs@gmail.com, cerasuolodomenico@gmail.com, surenb@google.com, lizhijian@fujitsu.com, willy@infradead.org, vbabka@suse.cz, ziy@nvidia.com, linux-kernel@vger.kernel.org, linux-mm@kvack.org Subject: Re: [PATCH v4] vmstat: Kernel stack usage histogram Message-Id: <20240723170913.07bfd0ba8a2557285263912e@linux-foundation.org> In-Reply-To: References: <20240718202611.1695164-1-pasha.tatashin@soleen.com> <2fbbxcsjs7vtzpb6a5wudbppcr2wgc2xwdw3cgs6ejzx6rioze@z2sct6rbulng> X-Mailer: Sylpheed 3.8.0beta1 (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 Fri, 19 Jul 2024 15:04:40 -0700 Shakeel Butt wrote: > > > Any specific reason to add this function in header? > > > > For performance reasons to keep it inlined into stack_not_used() which > > is also defined as inline function in this header. > > > > Is this really that performance critical? Nope. stack_not_used() is for CONFIG_DEBUG_STACK_USAGE and stack_not_used() is slow. I suggest that stack_not_used() (and hence kstack_histogram()) be uninlined. This can be a followup patch.