Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp555694pxf; Wed, 17 Mar 2021 10:23:22 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwHuORDnILdLafcHl7Zsh3iR+iO1LOXmCWq/8vpo4j+uMsmztXWD8GcVf2K76LvvASFVbfX X-Received: by 2002:a17:906:b20b:: with SMTP id p11mr37225491ejz.0.1616001801743; Wed, 17 Mar 2021 10:23:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1616001801; cv=none; d=google.com; s=arc-20160816; b=Xt35H9qL0LNNIAQzBh9hA29pTlxzxBRsD0WdhjaNh9r9+33ZQxCcjMcGfSoP8reHqF yaYnOs/WrqBuoWLU8OB2hVQR6OQ+FHVu8i3aSsNfUvyDSQNZ9NKohyXAt/EWOB1UgHne BCuXzhKWrmlIRxG9l6YSyIY3uv6grqyeEqK0IWCvbGVlxvG8ZY0Sb6Yaic03djRNGl4u oFU6+o2lb33HLC0RURUkKfDbcWvur1ji5ged/jb2Ay98ZuLuknX/rYwRo2UqPAU5he5h XVKipFLFMZf19yGq6IEAJhLqLZoJdLAVa7NcBDYlQul6j5ow9V5J/viv1EdzRlGj8d7p m7Zw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version; bh=0jDtMXm/8T16SOq+1HnXbEs1YaZqdkGTSbVIUmw5XVM=; b=EPdNRR9PCjhCRQqsklVMnWKR1Lr0fhQ28Xph95ZTJZ0xWXat08BY3E0D+6dNONFLfW xlofWOpIxbPzZl9knOlOlGLg+GFaKsTyQJx5+ZSpUPtF1iGrD/a8/hRtEAEMvQ1pXMXy FR3ViG0cbj+rlRGqxBKdGi689z3ROHTTJPR8Bcev1MbEQiRlm3wDJurFyHCusoH7Rt0j 2F3XMnTWL8kxmTaZ1OA5TriNNEWC3wh4126r/5dgTKBRmb+58sStu7gSKWI2zaP/Qutn GDUf0VErbC5MQrHna3BqTcGIPDvOOiChg7F4hlVJJNFVAs9cXZTEbGVI3MjonqqfsIdH c13w== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=canonical.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id d16si6693938edc.45.2021.03.17.10.22.58; Wed, 17 Mar 2021 10:23:21 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=canonical.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232135AbhCQQO2 (ORCPT + 99 others); Wed, 17 Mar 2021 12:14:28 -0400 Received: from youngberry.canonical.com ([91.189.89.112]:35131 "EHLO youngberry.canonical.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232101AbhCQQOV (ORCPT ); Wed, 17 Mar 2021 12:14:21 -0400 Received: from mail-lj1-f198.google.com ([209.85.208.198]) by youngberry.canonical.com with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1lMYoO-0004pp-C5 for linux-kernel@vger.kernel.org; Wed, 17 Mar 2021 16:14:20 +0000 Received: by mail-lj1-f198.google.com with SMTP id 74so15167778ljj.3 for ; Wed, 17 Mar 2021 09:14:20 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=0jDtMXm/8T16SOq+1HnXbEs1YaZqdkGTSbVIUmw5XVM=; b=NpiGDI+j81ml7uWdxJocREBeE2jRuhlHClA8xBdIfRGrtawI2FPRmfi3sO4jyWXtmO BXR/be+IstKsFTamwEZXvVl3kMCawhIqrqcriYcMthC9P7XWKk2FmQdohqUn++ZevB01 0O6KfkotAwPrRASJw8bx598lVvfG6opEl/5nLEG2Kz7w3aZQCWRk/x6E2DbZfxxKDcbG wx9k1BaPkVOyxW3yjl4BBvwdHeOp7NxzdLz1flCD++KMfJy3vz7faPSDT9TVbDOhZwTq S/3IjXBoap+3f+l5las7HAFcMq+bNJUbKAVQwakCAACLBC2AjvgEgm/Opx+hXhe4riVH jUag== X-Gm-Message-State: AOAM532g+lyeiSw8av6Fzk2ldyDu4d1QHEIKNQMHCX/BXbtCU7LESSUW ZxJthcGPE/wGm9ZCMX6+bPAZqPb7WC6QSb1imn6oG7rCOp9+Ngc5zneAS5q8G0YblxsMJxK1d+y s4+aVLjfawS7NOCJBBpl7YolpzBle1X5KrBibmfqW8GaIkQHC834QLwYQCA== X-Received: by 2002:a2e:921a:: with SMTP id k26mr2402759ljg.149.1615997659806; Wed, 17 Mar 2021 09:14:19 -0700 (PDT) X-Received: by 2002:a2e:921a:: with SMTP id k26mr2402749ljg.149.1615997659528; Wed, 17 Mar 2021 09:14:19 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Kai-Heng Feng Date: Thu, 18 Mar 2021 00:14:07 +0800 Message-ID: Subject: Re: [PATCH][RESEND] Revert "PM: ACPI: reboot: Use S5 for reboot" To: Josef Bacik Cc: LKML , "Rafael J. Wysocki" , "kernel-team@fb.com" Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Mar 17, 2021 at 11:19 PM Josef Bacik wrote: > > On 3/16/21 10:50 PM, Kai-Heng Feng wrote: > > Hi, > > > > On Wed, Mar 17, 2021 at 10:17 AM Josef Bacik wrote: > >> > >> This reverts commit d60cd06331a3566d3305b3c7b566e79edf4e2095. > >> > >> This patch causes a panic when rebooting my Dell Poweredge r440. I do > >> not have the full panic log as it's lost at that stage of the reboot and > >> I do not have a serial console. Reverting this patch makes my system > >> able to reboot again. > > > > But this patch also helps many HP laptops, so maybe we should figure > > out what's going on on Poweredge r440. > > Does it also panic on shutdown? > > > > Sure I'll test whatever to get it fixed, but I just wasted 3 days bisecting and > lost a weekend of performance testing on btrfs because of this regression, so > until you figure out how it broke it needs to be reverted so people don't have > to figure out why reboot suddenly isn't working. That's unfortunate to hear. However, I've been spending tons of time on bisecting kernels. To me it's just a normal part of kernel development so I won't call it "wasted". Feel free to revert the patch though. > > Running "halt" has the same effect with and without your patch, it gets to > "system halted" and just sits there without powering off. Not entirely sure why > that is, but there's no panic. What about shutdown? pm_power_off_prepare() is used by shutdown but it's not used by halt. Kai-Heng > > The panic itself is lost, but I see there's an NMI and I have the RIP > > (gdb) list *('mwait_idle_with_hints.constprop.0'+0x4b) > 0xffffffff816dabdb is in mwait_idle_with_hints > (./arch/x86/include/asm/current.h:15). > 10 > 11 DECLARE_PER_CPU(struct task_struct *, current_task); > 12 > 13 static __always_inline struct task_struct *get_current(void) > 14 { > 15 return this_cpu_read_stable(current_task); > 16 } > 17 > 18 #define current get_current() > 19 > > : jmp 0xffffffff936dac02 > > : nopl (%rax) > : jmp 0xffffffff936dabac > > : nopl (%rax) > : mfence > : mov %gs:0x17bc0,%rax > : clflush (%rax) > : mfence > : xor %edx,%edx > : mov %rdx,%rcx > : mov %gs:0x17bc0,%rax > : monitor %rax,%rcx,%rdx > : mov (%rax),%rax > : test $0x8,%al > : jne 0xffffffff936dabdb > > : jmpq 0xffffffff936dabd0 > > : verw 0x9f9fec(%rip) # > 0xffffffff940d4bbc > : mov $0x1,%ecx > : mov %rdi,%rax > : mwait %rax,%rcx > : mov %gs:0x17bc0,%rax > : lock andb $0xdf,0x2(%rax) > : lock addl $0x0,-0x4(%rsp) > : mov (%rax),%rax > : test $0x8,%al > : je 0xffffffff936dac01 > > : andl > $0x7fffffff,%gs:0x6c93cf7f(%rip) # 0x17b80 > : retq > : mov %gs:0x17bc0,%rax > : lock orb $0x20,0x2(%rax) > : mov (%rax),%rax > : test $0x8,%al > : jne 0xffffffff936dabdb > > : jmpq 0xffffffff936dab95 > > : nopl 0x0(%rax) > > 0x4b is after the mwait, which means we're panicing in the > current_clr_polling(), where we do clear_thread_flag(TIF_POLLING_NRFLAG). Thanks, > > Josef