From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2992742AbcBSKcD (ORCPT ); Fri, 19 Feb 2016 05:32:03 -0500 Received: from foss.arm.com ([217.140.101.70]:45159 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2992716AbcBSKb6 (ORCPT ); Fri, 19 Feb 2016 05:31:58 -0500 Date: Fri, 19 Feb 2016 10:32:05 +0000 From: Will Deacon To: Zhi-zhou Cc: Catalin Marinas , robin.murphy@arm.com, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: Re: [PATCH] arm64: add architecture specified current_pt_regs Message-ID: <20160219103205.GD27062@arm.com> References: <1455796115-7844-1-git-send-email-zhizhou.zh@gmail.com> <20160218115824.GA2538@e104818-lin.cambridge.arm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Feb 19, 2016 at 10:30:09AM +0800, Zhi-zhou wrote: > On Thu, Feb 18, 2016 at 7:58 PM, Catalin Marinas > wrote: > > > > On Thu, Feb 18, 2016 at 07:48:35PM +0800, Zhi-zhou Zhang wrote: > > > From: zhizhou > > > > > > This patch is based on the implementation of arm. The generic > > > current_pt_regs is implemented with current->stack. It need to access > > > memory that would be too expensive. > > > > Do you have any performance numbers? > > I'm using QEMU, so no. Actually this macro isn't heavily used. I just > think using the generic > implementation is not very nice. It get task_struct from sp_el0, then > get stack(which is > equal to sp_el0) from task_struct. There are two unnecessary memory accesses. I'd much rather use the generic implementation unless there's a compelling reason not to. "I think it's not very nice" doesn't really cut it for me! Will