All of lore.kernel.org
 help / color / mirror / Atom feed
From: vcaputo@pengaru.com
To: Thomas Gleixner <tglx@linutronix.de>
Cc: Pavel Machek <pavel@ucw.cz>, linux-kernel <linux-kernel@vger.kernel.org>
Subject: Re: thinkpad x60: sound problems in 4.15-rc1 was Re: thinkpad x60: sound problems in 4.14.0-next-20171114
Date: Fri, 22 Dec 2017 21:37:01 -0800	[thread overview]
Message-ID: <20171223053700.xu2fdir32e4e6cd6@shells.gnugeneration.com> (raw)
In-Reply-To: <alpine.DEB.2.20.1712200131380.2282@nanos>

On Wed, Dec 20, 2017 at 01:33:45AM +0100, Thomas Gleixner wrote:
> On Tue, 19 Dec 2017, vcaputo@pengaru.com wrote:
> > On Wed, Dec 20, 2017 at 12:22:12AM +0100, Pavel Machek wrote:
> > > You forgot to mention commit id :-).
> > > 
> > 
> > That is very strange, anyhow:
> > 
> >  commit fdba46ffb4c203b6e6794163493fd310f98bb4be
> >  Author: Thomas Gleixner <tglx@linutronix.de>
> >  Date:   Wed Sep 13 23:29:27 2017 +0200
> > 
> >      x86/apic: Get rid of multi CPU affinity
> > 
> > 
> > Will try reverting soon, just a bit busy today out in the desert and the sun
> > is going down so my solar panel is useless.
> 
> The revert is not trivial.
> 
> What is the exact problem and how do you reproduce that?
> 
> Thanks,
> 

So I had some time today to poke at this some more.  Since it looks to
be easily reproduced by simply pulling the AC power while playing music
or doing IO, and dmesg clearly reports using mwait, I tried booting with
idle=nomwait to see if that made any difference.  It didn't, the same
thing still occurs.

In trying to make sense of this totally unfamiliar apic code and better
understand these changes, I came across this comment which seemed a bit
telling:

  40 void flat_vector_allocation_domain(int cpu, struct cpumask *retmask,
  41                                    const struct cpumask *mask)
  42 {
  43         /*
  44          * Careful. Some cpus do not strictly honor the set of cpus
  45          * specified in the interrupt destination when using lowest
  46          * priority interrupt delivery mode.
  47          *
  48          * In particular there was a hyperthreading cpu observed to
  49          * deliver interrupts to the wrong hyperthread when only one
  50          * hyperthread was specified in the interrupt desitination.
  51          */
  52         cpumask_clear(retmask);
  53         cpumask_bits(retmask)[0] = APIC_ALL_CPUS;
  54 }

It's this allocation domain mask hook which has been bypassed by the
offending commit.  The existing approach is more robust in the face of
relaxed adherence to destination cpumasks since it's all-inclusive,
whereas the new code is exclusive to a specific cpu.

Is it possible what I'm observing is just another manifestation of
what's being described in that comment?  This is a core 2 duo, so not
hyper-threaded.  But maybe something funny happens when switching
cstates in response to interrupts - like maybe the wrong cpu can be used
if it can save power vs. powering up another?  Just thinking out loud
here.

In any case, 4.15-rc4 is quite unusable on my machine because of this.

Pavel, do you observe the same behavior on your x60, WRT AC power?

I've dropped Takashi from the CC list as this pretty clearly isn't a
sound-specific problem.

Thanks,
Vito Caputo

  parent reply	other threads:[~2017-12-23  5:29 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-11-15 10:05 thinkpad x60: sound problems in 4.14.0-next-20171114 Pavel Machek
2017-11-15 10:43 ` Takashi Iwai
2017-11-15 11:11   ` Pavel Machek
2017-11-15 11:14     ` Takashi Iwai
2017-11-20 23:25       ` Pavel Machek
2017-11-27 16:30     ` thinkpad x60: sound problems in 4.15-rc1 was " Pavel Machek
2017-11-27 16:33       ` Takashi Iwai
2017-11-27 18:31         ` Pavel Machek
2017-11-27 18:35           ` Takashi Iwai
2017-11-27 18:44             ` Pavel Machek
2017-11-28  7:00               ` Takashi Iwai
2017-12-14  9:57                 ` Pavel Machek
2017-12-19  2:06                   ` vcaputo
2017-12-19  4:54                     ` vcaputo
2017-12-19 23:12                       ` vcaputo
2017-12-19 23:22                         ` Pavel Machek
2017-12-20  0:36                           ` vcaputo
2017-12-20  0:33                             ` Thomas Gleixner
2017-12-20  0:59                               ` vcaputo
2017-12-23  5:37                               ` vcaputo [this message]
2017-12-23 20:37                                 ` vcaputo
2017-12-23 20:33                                   ` Thomas Gleixner
2017-12-24 16:16                                     ` vcaputo
2017-12-28 10:41                                       ` Thomas Gleixner
2017-12-28 18:30                                         ` vcaputo
2017-12-28 23:24                                         ` [tip:x86/urgent] x86/apic: Switch all APICs to Fixed delivery mode tip-bot for Thomas Gleixner
2017-12-29 13:31                                         ` tip-bot for Thomas Gleixner
2017-12-29 13:35                                           ` Thomas Gleixner
2017-12-25 10:12                                 ` thinkpad x60: sound problems in 4.15-rc1 was Re: thinkpad x60: sound problems in 4.14.0-next-20171114 Pavel Machek
2017-12-25 10:09                       ` Pavel Machek
2018-01-02 20:54                 ` Pavel Machek

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=20171223053700.xu2fdir32e4e6cd6@shells.gnugeneration.com \
    --to=vcaputo@pengaru.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pavel@ucw.cz \
    --cc=tglx@linutronix.de \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.