lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20150714141024.GC10671@kw.sim.vm.gnt>
Date:	Tue, 14 Jul 2015 16:10:24 +0200
From:	Simon Guinot <simon.guinot@...uanux.org>
To:	Jacek Anaszewski <j.anaszewski@...sung.com>
Cc:	linux-leds@...r.kernel.org, linux-kernel@...r.kernel.org,
	cooloney@...il.com, rpurdie@...ys.net, stsp@...rs.sourceforge.net,
	pavel@....cz, sakari.ailus@...ux.intel.com, andreas.werner@....de,
	andrew@...n.ch, ospite@...denti.unina.it, anemo@....ocn.ne.jp,
	ben@...tec.co.uk, bootc@...tc.net, dmurphy@...com,
	daniel.jeong@...com, daniel@...que.org, davem@...emloft.net,
	fabio.baltieri@...il.com, balbi@...com, florian@...nwrt.org,
	gshark.jeong@...il.com, g.liakhovetski@....de,
	ingi2.kim@...sung.com, dl9pf@....de, johan@...nel.org,
	lenz@...wisc.edu, jogo@...nwrt.org, q1.kim@...sung.com,
	kris@...sk.org, kristoffer.ericson@...il.com,
	linus.walleij@...aro.org, broonie@...nel.org,
	michael.hennerich@...log.com, milo.kim@...com, nm127@...email.hu,
	ncase@...-inc.com, neilb@...e.de, nick.forbes@...epta.com,
	lost.distance@...oo.com, p.meerwald@...-electronic.com,
	n0-1@...ewrt.org, philippe.retornaz@...l.ch, raph@...com,
	rpurdie@...nedhand.com, rod@...tby.id.au, dave@...1.net,
	giometti@...ux.it, bigeasy@...utronix.de, shuahkhan@...il.com,
	sguinot@...ie.com, kyungmin.park@...sung.com
Subject: Re: [PATCH/RFC v3 0/7] Remove work queues from LED class drivers

On Fri, Jul 03, 2015 at 03:10:45PM +0200, Jacek Anaszewski wrote:
> This is a third version of the RFC aiming at removing work queues
> from LED class drivers, as well as getting rid of complimentary
> functionalities introduced along with addition of LED flash class
> extension.
> 
> 
> ======================
> Changes from version 2
> ======================
> 
> - split changes to several incremental patches
> - removed SET_BRIGHTNESS_SYNC and SET_BRIGHTNESS_ASYNC flags
> - fixed led_set_brightness_async function instead of renaming it
> 
> ======================
> Changes from version 1
> ======================
> 
> V2 includes also patches for one LED class driver
> and two LED flash class drivers, that show how the
> drivers will benefit from the optimization being
> introduced in the first patch of this patch set.
> 
> I was able to test only the LED Flash class drivers.
> 
> Original message from the patch 483a3122 ("leds: Use set_brightness_work for
> brightness_set ops that can sleep") that was sent previously as a single one:
> 
> Hi All,
> 
> Since this patch will affect all the LED subsystem drivers
> I'd like it was tested by as many developers as possible
> to make sure that I haven't missed something.
> 
> For the drivers which can sleep in their brightness_set ops
> (e.g. use mutex or gpio "cansleep" API) you only need to
> remove the work queues and move the code executed currently
> in the work queue task to the brightness_set op, as now
> LED core does the job.
> 
> For drivers that are capable of setting brightness with use
> of MMIO you need to set the LED_BRIGHTNESS_FAST flag, so
> that LED core would know that it doesn't have to employ
> work queue.
> 
> After the patch is positively verified I will create relevant
> patches for every LED class driver.
> 
> This patch is based on linux-next_20150622.
> 
> I am looking forward to your cooperation.
> 
> Best Regards,
> Jacek Anaszewski
> 
> Jacek Anaszewski (7):
>   leds: Add led_set_brightness_sync to the public LED subsystem API
>   leds: Improve asynchronous path of setting brightness
>   leds: Add an internal led_set_brightness_nosleep function
>   leds: Improve setting brightness in a non sleeping way
>   leds: Drivers shouldn't enforce SYNC/ASYNC brightness setting
>   media: flash: use led_set_brightness_sync for torch brightness
>   leds: pwm: remove work queue
> 
>  drivers/leds/led-class-flash.c                 |    7 ---
>  drivers/leds/led-class.c                       |   20 +++++----
>  drivers/leds/led-core.c                        |   42 +++++++++---------
>  drivers/leds/leds-aat1290.c                    |   50 ++++++---------------
>  drivers/leds/leds-ktd2692.c                    |   41 +++---------------
>  drivers/leds/leds-max77693.c                   |   55 +++---------------------
>  drivers/leds/leds-pwm.c                        |   24 ++---------
>  drivers/leds/leds.h                            |   34 ++++++++-------
>  drivers/leds/trigger/ledtrig-backlight.c       |    8 ++--
>  drivers/leds/trigger/ledtrig-default-on.c      |    2 +-
>  drivers/leds/trigger/ledtrig-gpio.c            |    6 +--
>  drivers/leds/trigger/ledtrig-heartbeat.c       |    4 +-
>  drivers/leds/trigger/ledtrig-oneshot.c         |    4 +-
>  drivers/leds/trigger/ledtrig-transient.c       |    8 ++--
>  drivers/media/v4l2-core/v4l2-flash-led-class.c |    8 ++--
>  include/linux/leds.h                           |   36 +++++++++++-----
>  16 files changed, 124 insertions(+), 225 deletions(-)

Hi Jacek,

I have successfully tested this patch set with both the leds-ns2 and
leds-netxbig drivers and with either sleeping and non-sleeping GPIOs
LEDs.

Tested-by: Simon Guinot <simon.guinot@...uanux.org>

Note that you may want to get rid of the comment
"Must not sleep, use a workqueue if needed" above the member
brightness_set in struct led_classdev.

Regards,

Simon

Download attachment "signature.asc" of type "application/pgp-signature" (182 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ