Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754450AbcKIUqN (ORCPT ); Wed, 9 Nov 2016 15:46:13 -0500 Received: from mail-wm0-f47.google.com ([74.125.82.47]:37291 "EHLO mail-wm0-f47.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753247AbcKIUqL (ORCPT ); Wed, 9 Nov 2016 15:46:11 -0500 Subject: Re: PM regression with LED changes in next-20161109 To: Tony Lindgren , Hans de Goede References: <20161109192301.GS26979@atomide.com> Cc: Jacek Anaszewski , linux-leds@vger.kernel.org, linux-omap@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Darren Hart From: Jacek Anaszewski Message-ID: <28234714-3994-6747-9cf8-1ff0b3257f7a@gmail.com> Date: Wed, 9 Nov 2016 21:45:28 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Icedove/45.4.0 MIME-Version: 1.0 In-Reply-To: <20161109192301.GS26979@atomide.com> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 946 Lines: 27 Hi Tony, On 11/09/2016 08:23 PM, Tony Lindgren wrote: > Hi, > > Looks like commit 883d32ce3385 ("leds: core: Add support for poll()ing > the sysfs brightness attr for changes.") breaks runtime PM for me. > > On my omap dm3730 based test system, idle power consumption is over 70 > times higher now with this patch! It goes from about 6mW for the core > system to over 440mW during idle meaning there's some busy timer now > active. > > Reverting this patch fixes the issue. Any ideas? Thanks for the report. This is probably caused by sysfs_notify_dirent(). I'm afraid that we can't keep this feature in the current shape. Hans, I'm dropping the patch. We probably will have to delegate this call to a workqueue task. Think about use cases when the LED is blinked with high frequency e.g. from ledtrig-disk.c. Also, IMHO the notifications should be enabled only if explicitly selected in the kernel config. -- Best regards, Jacek Anaszewski