From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751180AbdFAMgM (ORCPT ); Thu, 1 Jun 2017 08:36:12 -0400 Received: from mx1.redhat.com ([209.132.183.28]:49984 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751090AbdFAMgL (ORCPT ); Thu, 1 Jun 2017 08:36:11 -0400 DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com C0915C04B92A Authentication-Results: ext-mx07.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx07.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=jpoimboe@redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com C0915C04B92A Date: Thu, 1 Jun 2017 07:36:09 -0500 From: Josh Poimboeuf To: Peter Zijlstra Cc: x86@kernel.org, linux-kernel@vger.kernel.org, live-patching@vger.kernel.org, Linus Torvalds , Andy Lutomirski , Jiri Slaby , Ingo Molnar , "H. Peter Anvin" Subject: Re: [RFC PATCH 10/10] x86/unwind: add undwarf unwinder Message-ID: <20170601123609.ku5zq2huhlneq2dn@treble> References: <89552d4047e5aed843f7b6a54277f9af62da6a82.1496293620.git.jpoimboe@redhat.com> <20170601121356.5yoeq74el77sewoo@hirez.programming.kicks-ass.net> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20170601121356.5yoeq74el77sewoo@hirez.programming.kicks-ass.net> User-Agent: Mutt/1.6.0.1 (2016-04-01) X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.31]); Thu, 01 Jun 2017 12:36:11 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Jun 01, 2017 at 02:13:56PM +0200, Peter Zijlstra wrote: > So we do that lookup for every single frame. That's going to hurt. > > Would it make sense to cache the last 'module' in an attempt to at least > avoid that lookup again? Something like so: The only thing with caching the module is, what if the module goes away? Based on your previous comment I was thinking I would disable preemption for the entire unwind_next_frame() step, but not *between* steps. I suppose we could require the unwind caller to disable preemption but I'd like to avoid that if possible. -- Josh