Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp508968pxf; Wed, 17 Mar 2021 09:28:29 -0700 (PDT) X-Google-Smtp-Source: ABdhPJydSgo4kdeKVrbL7PWv6Q3m/u9DiIcakBA36Dzn2tw1bhmntAlgHELVyyGkQ59+FI4bUjFw X-Received: by 2002:a17:906:7fc4:: with SMTP id r4mr35785668ejs.81.1615998509172; Wed, 17 Mar 2021 09:28:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1615998509; cv=none; d=google.com; s=arc-20160816; b=wpoZARPcDOOsesXEJE6X0C3JcYj/KeDH72Cs8uhuGe6OiLkkbbinOty3/QKSV0NGno ZeuY3eNVIvmrObWGnlOxMh6IbLZqE21JEatw3fyz4fq3ujfHH2vKHqZrPYHZ2KdZlrpf U6kPTASi9wkKJa2NplftmKP0qviyUBHi/nZGUrII5MhmILQQLlfkqcVXaFqrQ7Jgi7Qs yIKTxwFaIT9LtiU6xDjBY3DPghhAYyj81T1hMLw6RPLjcN+/RTdvYGfRbefCEajPVl4P 9u/UxIB+ffC8Cr8imNE4q1w4RFMQ+B/9NB6ZT6+o1G7pVDnMKBRqG2mjSd1eXOPsKgmK DUhw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject:dkim-signature; bh=T8ZVDRngx7SfOHOksYEtUxmnvVwRwyIdjJ9TXCeErI0=; b=J5g440y7Lg75KZOdKHn0XecteCJG6fXsJHuOj7xCtGGUfdPNW2clqnjtnQlqE1mHrM efkcJh3PPjUFs2QHNLiJvlc7xeafaR0EA8kNLwVZ9yFWEjqBOh1Z1NIyT0OojNU31LN0 A2hft8RtVz8fo2ipPdCXuqQavhClRz1Fpil6RKBEdEwU4nuqQiJyBWuvruQLNsvnyZNE cF9FQcEMDCRGaZBfJAWqR4uFe/k/lJkclT3EEW9hnDQTc1psI4il/1an0bjMTSlw3JdA p5/hXeAM0dVyyZmb65MIfssFla4RdpN1GrC89MzOdWMKrN3St9h5k2DQaRcZZ+Tk7Vgp /N9A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@toxicpanda-com.20150623.gappssmtp.com header.s=20150623 header.b=vKJV7Zr2; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id q17si18003326edb.68.2021.03.17.09.28.05; Wed, 17 Mar 2021 09:28:29 -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; dkim=pass header.i=@toxicpanda-com.20150623.gappssmtp.com header.s=20150623 header.b=vKJV7Zr2; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232153AbhCQQZx (ORCPT + 99 others); Wed, 17 Mar 2021 12:25:53 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51948 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232109AbhCQQZX (ORCPT ); Wed, 17 Mar 2021 12:25:23 -0400 Received: from mail-pj1-x102f.google.com (mail-pj1-x102f.google.com [IPv6:2607:f8b0:4864:20::102f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3C119C06174A for ; Wed, 17 Mar 2021 09:25:23 -0700 (PDT) Received: by mail-pj1-x102f.google.com with SMTP id w8so1403142pjf.4 for ; Wed, 17 Mar 2021 09:25:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=toxicpanda-com.20150623.gappssmtp.com; s=20150623; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=T8ZVDRngx7SfOHOksYEtUxmnvVwRwyIdjJ9TXCeErI0=; b=vKJV7Zr2kO1BbXKDI4W1yjK3GY0tGe5TJ7VcEi+BHFVjD6lAQZlcwrWzvzIriTUqsw RN24cMy2wS1V2+sWbgoH+Z/UcJNQhJR5EsJ07mcWyWQ0fPRFlTRJUSG8jba/D394CuX0 V3VowweoXBfnnkW/PAAhbuuRI/U5a4wKmVo5svH3GXnijgYRDJblDfxT9ZRjEDVjXK54 OMKxWShbm/YwQ7GK8BUVrh9yyZf9nlWRRzqlchzshHuN/zZmMvatS1Jag7dmwdxO8xCi FtYv8fw14opDuhzBq//Y1/CSywkOuCKAQXJcavOzGp+1cOGcdj6ldKh95SDh0o7nGQ3U +u4w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=T8ZVDRngx7SfOHOksYEtUxmnvVwRwyIdjJ9TXCeErI0=; b=rct2zn5TL93j4jdV7k+y8FWlRvrXKwYJlmDrCY64UcsX59ZJofk9ePwfWiOFnlRkDy EBU+/FriDh34jTSqfaTUE70fA1J1N9xeBBZ23/LhT6D8PaGM0y7MrkZbYmJvw1FfjTKv ypOoasebdxSrs8xMfxXHdlZgN0VM8pSAn54pwx8CX70q1nNG1wzN1A8RYCJmSOXUSthz 9agX/yYsOrfLYq2dUt0QmUfuSq6cGnvhKnmv13AEPvKOjpVFdNKFB5W0EEQOemhWfn20 5IuwPbHKxQB5c/2/Tmx0VvGVCp+IYNu/LMaKYEYYDzwGYo16f2taPDpKFLslPyKwJ83a Cz/A== X-Gm-Message-State: AOAM530XL0I+Zri1XjvDntjX1i+rZyclBl01d4wMXWtkY56xg3nxejdM MY4xwvhNH5c24KjsHR1U2D9/N0rr5qNqMCEI X-Received: by 2002:ad4:5ce7:: with SMTP id iv7mr5503229qvb.7.1615994363393; Wed, 17 Mar 2021 08:19:23 -0700 (PDT) Received: from [192.168.1.45] (cpe-174-109-172-136.nc.res.rr.com. [174.109.172.136]) by smtp.gmail.com with ESMTPSA id l186sm17703862qke.92.2021.03.17.08.19.22 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 17 Mar 2021 08:19:22 -0700 (PDT) Subject: Re: [PATCH][RESEND] Revert "PM: ACPI: reboot: Use S5 for reboot" To: Kai-Heng Feng Cc: LKML , "Rafael J. Wysocki" , "kernel-team@fb.com" References: From: Josef Bacik Message-ID: Date: Wed, 17 Mar 2021 11:19:21 -0400 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:78.0) Gecko/20100101 Thunderbird/78.7.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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. 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. 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