linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Jean-François Lessard" <jefflessard3@gmail.com>
To: Andy Shevchenko <andriy.shevchenko@intel.com>
Cc: Andy Shevchenko <andy@kernel.org>,
	Geert Uytterhoeven <geert@linux-m68k.org>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH 4/5] auxdisplay: linedisp: support attribute attachment to auxdisplay devices
Date: Wed, 03 Sep 2025 07:31:05 -0400	[thread overview]
Message-ID: <CB8AD4ED-5E01-49EB-A177-9C7431E87181@gmail.com> (raw)
In-Reply-To: <aLgV6lcxvs5JLUdk@smile.fi.intel.com>

Le 3 septembre 2025 06 h 18 min 18 s HAE, Andy Shevchenko <andriy.shevchenko@intel.com> a écrit :
>On Tue, Sep 02, 2025 at 01:37:52PM -0400, Jean-François Lessard wrote:
>> Le 2 septembre 2025 06 h 18 min 24 s HAE, Andy Shevchenko <andriy.shevchenko@intel.com> a écrit :
>> >On Sun, Aug 31, 2025 at 10:00:28PM -0400, Jean-François Lessard wrote:
>
>...
>
>> >> +static DEFINE_SPINLOCK(linedisp_attachments_lock);
>> >
>> >Why spin lock and not mutex?
>> 
>> The attachment list operations are extremely lightweight (just adding/removing
>> list entries), making spinlock the optimal choice because:
>> - Very short critical sections: Only list traversal and pointer assignments;
>>   avoids context switching overhead for brief operations
>> - No sleeping operations: No memory allocation or I/O within locked sections
>> - Future-proof atomic context safety: Can be safely called from interrupt
>>   handlers if needed
>
>To me it sounds like solving non-existing problem. I am sure we will see no
>driver that tries to call this API in an atomic context.
>

Yeah, I should have skipped "Future-proof atomic context safety".
I don't see how attach/detach would be called from atomic context.
Maybe to_linedisp(), but not in the current implementation anyway.

  reply	other threads:[~2025-09-03 11:31 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-09-01  2:00 [PATCH 0/5] auxdisplay: linedisp: support attribute attachment to auxdisplay devices Jean-François Lessard
2025-09-01  2:00 ` [PATCH 1/5] auxdisplay: linedisp: encapsulate container_of usage within to_linedisp Jean-François Lessard
2025-09-01  2:00 ` [PATCH 2/5] auxdisplay: linedisp: display static message when length <= display size Jean-François Lessard
2025-09-02 10:03   ` Andy Shevchenko
2025-09-02 17:12     ` Jean-François Lessard
2025-09-01  2:00 ` [PATCH 3/5] auxdisplay: linedisp: add num_chars sysfs attribute Jean-François Lessard
2025-09-02 10:04   ` Andy Shevchenko
2025-09-02 17:15     ` Jean-François Lessard
2025-09-01  2:00 ` [PATCH 4/5] auxdisplay: linedisp: support attribute attachment to auxdisplay devices Jean-François Lessard
2025-09-02 10:18   ` Andy Shevchenko
2025-09-02 17:37     ` Jean-François Lessard
2025-09-03 10:18       ` Andy Shevchenko
2025-09-03 11:31         ` Jean-François Lessard [this message]
2025-09-01  2:00 ` [PATCH 5/5] docs: ABI: auxdisplay: document linedisp library sysfs attributes Jean-François Lessard
2025-09-02 10:59   ` Andy Shevchenko
2025-09-02 17:42     ` Jean-François Lessard
2025-09-02 11:00 ` [PATCH 0/5] auxdisplay: linedisp: support attribute attachment to auxdisplay devices Andy Shevchenko
2025-09-02 17:44   ` Jean-François Lessard

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CB8AD4ED-5E01-49EB-A177-9C7431E87181@gmail.com \
    --to=jefflessard3@gmail.com \
    --cc=andriy.shevchenko@intel.com \
    --cc=andy@kernel.org \
    --cc=geert@linux-m68k.org \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).