From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mgamail.intel.com (mgamail.intel.com [134.134.136.24]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 51ADC3EA73; Fri, 15 Dec 2023 16:36:35 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: smtp.subspace.kernel.org; spf=fail smtp.mailfrom=kernel.org X-IronPort-AV: E=McAfee;i="6600,9927,10924"; a="398088456" X-IronPort-AV: E=Sophos;i="6.04,279,1695711600"; d="scan'208";a="398088456" Received: from orsmga005.jf.intel.com ([10.7.209.41]) by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 15 Dec 2023 08:36:34 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10924"; a="948021596" X-IronPort-AV: E=Sophos;i="6.04,279,1695711600"; d="scan'208";a="948021596" Received: from smile.fi.intel.com ([10.237.72.54]) by orsmga005.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 15 Dec 2023 08:36:26 -0800 Received: from andy by smile.fi.intel.com with local (Exim 4.97) (envelope-from ) id 1rEBAl-00000006AaA-3piW; Fri, 15 Dec 2023 18:36:23 +0200 Date: Fri, 15 Dec 2023 18:36:23 +0200 From: Andy Shevchenko To: Kent Gibson Cc: linux-kernel@vger.kernel.org, linux-gpio@vger.kernel.org, brgl@bgdev.pl, linus.walleij@linaro.org Subject: Re: [PATCH v3 3/5] gpiolib: cdev: reduce locking in gpio_desc_to_lineinfo() Message-ID: References: <20231215023805.63289-1-warthog618@gmail.com> <20231215023805.63289-4-warthog618@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20231215023805.63289-4-warthog618@gmail.com> Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo On Fri, Dec 15, 2023 at 10:38:03AM +0800, Kent Gibson wrote: > Reduce the time holding the gpio_lock by snapshotting the desc flags, > rather than testing them individually while holding the lock. > > Accept that the calculation of the used field is inherently racy, and > only check the availability of the line from pinctrl if other checks > pass, so avoiding the check for lines that are otherwise in use. Just wondering if you are using --histogram (diff algo) when preparing the patches... -- With Best Regards, Andy Shevchenko