Re: Dell Vostro V131 hotkeys revisited

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Dec 17, 2015 at 07:54:35PM +0100, Hans de Goede wrote:
> Hi,
> 
> On 17-12-15 19:47, Pali Rohár wrote:
> >Hi Hans! See my comments below about your patches.

...

> >>@@ -159,7 +157,8 @@ static void dell_wmi_process_key(int reported_key)
> >>
> >>  	/* Don't report brightness notifications that will also come via ACPI */
> >>  	if ((key->keycode == KEY_BRIGHTNESSUP ||
> >>-	     key->keycode == KEY_BRIGHTNESSDOWN) && acpi_video)
> >>+	     key->keycode == KEY_BRIGHTNESSDOWN) &&
> >>+	    acpi_video_handles_brightness_key_presses())
> >
> >I do not like this, because that function uses mutex and is called every
> >time when brightness key event is received by wmi notify handler.
> 
> Right and this is going to happen 1000-s of times a second so is
> really going to be a performance problem (not).
> 
> We cannot cache the return value as was being done before because it
> can change during startup depending in module loading order (the old
> code actually got this somewhat wrong), and taking a mutex in a code-path
> which gets executed only once a second tops is really a non issue.

Right, this is not a hot path, so the mutex is, indeed, not an issue.

-- 
Darren Hart
Intel Open Source Technology Center
--
To unsubscribe from this list: send the line "unsubscribe platform-driver-x86" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Kernel Development]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux