From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752233AbdHMAAZ (ORCPT ); Sat, 12 Aug 2017 20:00:25 -0400 Received: from mga02.intel.com ([134.134.136.20]:44118 "EHLO mga02.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752132AbdHMAAX (ORCPT ); Sat, 12 Aug 2017 20:00:23 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.41,365,1498546800"; d="scan'208";a="136778978" Message-ID: <1502582422.20268.53.camel@linux.intel.com> Subject: Re: [PATCH v3] ACPI / Sleep: Check low power idle constraints for debug only From: Srinivas Pandruvada To: "Rafael J. Wysocki" Cc: "Rafael J. Wysocki" , Len Brown , Linux PM , Mario Limonciello , Linux Kernel Mailing List , ACPI Devel Maling List Date: Sat, 12 Aug 2017 17:00:22 -0700 In-Reply-To: References: <1502475835-54818-1-git-send-email-srinivas.pandruvada@linux.intel.com> <18796717.B6iU8dePCh@aspire.rjw.lan> <1502553556.20268.47.camel@linux.intel.com> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.18.5.2 (3.18.5.2-1.fc23) Mime-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, 2017-08-13 at 00:37 +0200, Rafael J. Wysocki wrote: > On Sat, Aug 12, 2017 at 5:59 PM, Srinivas Pandruvada > wrote: > > > > On Sat, 2017-08-12 at 16:27 +0200, Rafael J. Wysocki wrote: > > [...] > > > > > > > > > > > > > + > > > > +struct lpi_constraints { > > > > +   char *name; > > > > +   int min_dstate; > > > If you store the handle here as well, you won't need to > > > look it up every time _check_constraints() is called. > > The reason I didn't keep handle here, I thought handle can be stale > > or > > change for PnP device on plug in and out. Is this not true? > The handles don't go away on hot remove as a rule.  That may only > happen if tables get unloaded, but basically the constraints should > not point to anything in a table that may go away. So we don't need to worry about this case where tables gets unloaded and replaced? This is in a debug path, so additional overhead of path to handle conversion may not be significant. Thanks, Srinivas