From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail.linutronix.de (146.0.238.70:993) by crypto-ml.lab.linutronix.de with IMAP4-SSL for ; 07 Feb 2019 21:55:23 -0000 Received: from mga12.intel.com ([192.55.52.136]) by Galois.linutronix.de with esmtps (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1grrdi-0004ky-EX for speck@linutronix.de; Thu, 07 Feb 2019 22:55:22 +0100 Date: Thu, 7 Feb 2019 13:55:18 -0800 From: Andi Kleen Subject: [MODERATED] Re: [PATCH v2 0/8] PERFv2 Message-ID: <20190207215518.GT31598@tassilo.jf.intel.com> References: <20190207132709.GA32477@hirez.programming.kicks-ass.net> <20190207143759.GP31598@tassilo.jf.intel.com> <20190207153728.GE32477@hirez.programming.kicks-ass.net> <20190207162047.GR31598@tassilo.jf.intel.com> <20190207164932.GC32511@hirez.programming.kicks-ass.net> MIME-Version: 1.0 In-Reply-To: <20190207164932.GC32511@hirez.programming.kicks-ass.net> Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit To: speck@linutronix.de List-ID: On Thu, Feb 07, 2019 at 05:49:32PM +0100, speck for Peter Zijlstra wrote: > On Thu, Feb 07, 2019 at 08:20:47AM -0800, speck for Andi Kleen wrote: > > > > Doesn't that overwrite the global shared constraints constraints? > > > > Would need to make them non const at least, it will likely fault. > > > > > > They are !const; we already update them at init time (for example we add > > > the GPRs to the fixed ones etc..). > > > > Surely not for emptyconstraint ? > > We leave that empty indeed :-), but it isn't const either (although it > could've been). > > Luckily emptyconstraint doesn't actually have PMC3 set, so we don't have > to clear it (of course the code as proposed by me does the superfluous > store). > > Anyway; I suspect we could use the dynamic constraints here and avoid > some of the obvious fail. I just need to re-read how all that was > supposed to work. But it looks like cpuc->constraints_list[] already has > all we need. > > So I _think_ something like so... I already fixed it in my version by using a temporary constraint in the cpuc. Will post shortly. -Andi