From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751145AbdALQQx (ORCPT ); Thu, 12 Jan 2017 11:16:53 -0500 Received: from bombadil.infradead.org ([198.137.202.9]:55896 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750851AbdALQQw (ORCPT ); Thu, 12 Jan 2017 11:16:52 -0500 Date: Thu, 12 Jan 2017 17:16:43 +0100 From: Peter Zijlstra To: Byungchul Park Cc: mingo@kernel.org, tglx@linutronix.de, walken@google.com, boqun.feng@gmail.com, kirill@shutemov.name, linux-kernel@vger.kernel.org, linux-mm@kvack.org, iamjoonsoo.kim@lge.com, akpm@linux-foundation.org, npiggin@gmail.com Subject: Re: [PATCH v4 05/15] lockdep: Make check_prev_add can use a separate stack_trace Message-ID: <20170112161643.GB3144@twins.programming.kicks-ass.net> References: <1481260331-360-1-git-send-email-byungchul.park@lge.com> <1481260331-360-6-git-send-email-byungchul.park@lge.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1481260331-360-6-git-send-email-byungchul.park@lge.com> User-Agent: Mutt/1.5.23.1 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Dec 09, 2016 at 02:12:01PM +0900, Byungchul Park wrote: > check_prev_add() saves a stack trace of the current. But crossrelease > feature needs to use a separate stack trace of another context in > check_prev_add(). So make it use a separate stack trace instead of one > of the current. > So I was thinking, can't we make check_prevs_add() create the stack trace unconditionally but record if we used it or not, and then return the entries when unused. All that is serialized by graph_lock anyway and that way we already pass a stack into check_prev_add() so we can easily pass in a different one. I think that removes a bunch of tricky and avoids all the new tricky.