[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <d5a60a5e-5254-b8cb-5bba-53011d657c90@gmail.com>
Date: Sun, 1 Nov 2020 17:40:08 +0100
From: Jacek Anaszewski <jacek.anaszewski@...il.com>
To: Marek BehĂșn <kabel@...nel.org>
Cc: netdev@...r.kernel.org, linux-leds@...r.kernel.org,
Pavel Machek <pavel@....cz>, Dan Murphy <dmurphy@...com>,
Russell King <linux@...linux.org.uk>,
Andrew Lunn <andrew@...n.ch>,
Matthias Schiffer <matthias.schiffer@...tq-group.com>,
"David S. Miller" <davem@...emloft.net>,
Ben Whitten <ben.whitten@...il.com>
Subject: Re: [PATCH RFC leds + net-next 2/7] leds: trigger: netdev: simplify
the driver by using bit field members
On 10/31/20 12:45 AM, Marek BehĂșn wrote:
> On Fri, 30 Oct 2020 23:37:52 +0100
> Jacek Anaszewski <jacek.anaszewski@...il.com> wrote:
>
>> Hi Marek,
>>
>> Bitops are guaranteed to be atomic and this was done for a reason.
>
> Hmm okay...
> Sooo, netdev_trig_work cannot be executed at the same time as the
> link/linkup/rx/tx changing stuff from netdev_trig_notify,
> interval_store or netdev_led_attr_store, because all these functions
> ensure cancelation of netdev_trig_work by calling
> cancel_delayed_work_sync. Doesn't this somehow prevent the need for
> memory barriers provided by atomic bitops?
That's true. But unless there is proven decline in performance related
to use of bitops, I don't see any gain in removing those from this
trigger. They improve code readability.
> BTW Jacek what do you think about the other patches?
I like the idea, but I'd need to spend more time reviewing it.
One thing coming to mind at first glance - it would be good to get rid
of blink_set op at this occasion since this is just another case of
trigger offloading. It would however need touching many drivers, so
that could possibly be done as a follow-up.
--
Best regards,
Jacek Anaszewski
Powered by blists - more mailing lists