linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Darren Hart <dvhart@infradead.org>
To: "Michał Kępień" <kernel@kempniu.pl>
Cc: "Rafael J. Wysocki" <rjw@rjwysocki.net>,
	Jonathan Woithe <jwoithe@just42.net>,
	Andy Shevchenko <andy@infradead.org>,
	platform-driver-x86@vger.kernel.org, linux-acpi@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/7] platform/x86: fujitsu-laptop: do not use kfifo for storing hotkey scancodes
Date: Wed, 28 Jun 2017 09:03:38 -0700	[thread overview]
Message-ID: <20170628160338.GA20795@localhost.localdomain> (raw)
In-Reply-To: <20170628043044.GA3422@kmp-mobile.hq.kempniu.pl>

On Wed, Jun 28, 2017 at 06:30:44AM +0200, Michał Kępień wrote:
> > On Sat, Jun 24, 2017 at 02:25:46AM +0200, Rafael Wysocki wrote:
> > > On Wednesday, June 21, 2017 11:15:43 AM Darren Hart wrote:
> > > > On Fri, Jun 16, 2017 at 06:40:52AM +0200, Michał Kępień wrote:
> > > > > All ACPI device notify callbacks are invoked using acpi_os_execute(),
> > > > > which causes the supplied callback to be queued to a static workqueue
> > > > > which always executes on CPU 0.  This means that there is no possibility
> > > > > for any ACPI device notify callback to be concurrently executed on
> > > > > multiple CPUs, which in the case of fujitsu-laptop means that using a
> > > > > locked kfifo for handling hotkeys is redundant: as hotkey scancodes are
> > > > > only pushed and popped from within acpi_fujitsu_laptop_notify(), no risk
> > > > > of concurrent pushing and popping exists.
> > > > 
> > > > Was the kfifo causing a problem currently or for the migration to separate
> > > > modules? Is this purely a simplification?
> > > > 
> > > > Rafael, the above rationale appears sound to me. Do you have any concerns?
> > > 
> > > I actually do.
> > > 
> > > While this is the case today, making the driver code depend on it in a hard way
> > > sort of makes it difficult to change in the future if need be.
> > 
> > OK, if we aren't guaranteed for this to run on CPU 0 in the future, and this
> > will be annoying to debug if it does changes, let's skip the kfifo change.
> > 
> > I have removed this patch, and fixed up the merge conflicts of the remaining 6
> > patches here:
> > 
> > http://git.infradead.org/linux-platform-drivers-x86.git/shortlog/refs/heads/fujitsu
> > 
> > Michal / Jonathan, would you please review and let me know if this is what you
> > would have done / approve the rebase?
> 
> The only issue I can see is that the push/pop debug messages in the last
> patch contain the word "buffer" instead of the original "ringbuffer".
> The dropped kfifo patch changed the wording from "ringbuffer" to
> "buffer" as applying it means there is no ringbuffer any more, but since
> it was not applied in the end, I guess the original wording should stay
> in place.
> 
> The rest looks good to me.

Good catch, thank you. The testing branch has been rebased to reflect these
changes.

-- 
Darren Hart
VMware Open Source Technology Center

  reply	other threads:[~2017-06-28 16:03 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-06-16  4:40 [PATCH 0/7] fujitsu-laptop: ACPI-related cleanups Michał Kępień
2017-06-16  4:40 ` [PATCH 1/7] platform/x86: fujitsu-laptop: do not use kfifo for storing hotkey scancodes Michał Kępień
2017-06-21 18:15   ` Darren Hart
2017-06-21 23:50     ` Jonathan Woithe
2017-06-22  2:44       ` Darren Hart
2017-06-22  3:01         ` Jonathan Woithe
2017-06-22 20:46           ` Michał Kępień
2017-06-22 23:58             ` Darren Hart
2017-06-23  0:14               ` Jonathan Woithe
2017-06-23  5:54                 ` Darren Hart
2017-06-22 20:08     ` Michał Kępień
2017-06-24  0:25     ` Rafael J. Wysocki
2017-06-27  0:07       ` Darren Hart
2017-06-27 12:16         ` Jonathan Woithe
2017-06-28  4:30         ` Michał Kępień
2017-06-28 16:03           ` Darren Hart [this message]
2017-06-16  4:40 ` [PATCH 2/7] platform/x86: fujitsu-laptop: remove redundant safety checks Michał Kępień
2017-06-16  4:40 ` [PATCH 3/7] platform/x86: fujitsu-laptop: use strcpy to set ACPI device names and classes Michał Kępień
2017-06-16  4:40 ` [PATCH 4/7] platform/x86: fujitsu-laptop: sanitize hotkey input device identification Michał Kępień
2017-06-16  4:40 ` [PATCH 5/7] platform/x86: fujitsu-laptop: do not update ACPI device power status Michał Kępień
2017-06-21 20:17   ` Darren Hart
2017-06-22 21:02     ` Michał Kępień
2017-06-22 23:58       ` Darren Hart
2017-06-23  0:16         ` Jonathan Woithe
2017-06-23  5:52           ` Darren Hart
2017-06-16  4:40 ` [PATCH 6/7] platform/x86: fujitsu-laptop: do not evaluate ACPI _INI methods Michał Kępień
2017-06-16  4:40 ` [PATCH 7/7] platform/x86: fujitsu-laptop: rework debugging Michał Kępień
2017-06-18 10:35 ` [PATCH 0/7] fujitsu-laptop: ACPI-related cleanups Jonathan Woithe
2017-06-22 23:57 ` Darren Hart

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=20170628160338.GA20795@localhost.localdomain \
    --to=dvhart@infradead.org \
    --cc=andy@infradead.org \
    --cc=jwoithe@just42.net \
    --cc=kernel@kempniu.pl \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=platform-driver-x86@vger.kernel.org \
    --cc=rjw@rjwysocki.net \
    /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).