Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp833513ybb; Fri, 3 Apr 2020 12:43:05 -0700 (PDT) X-Google-Smtp-Source: APiQypK908gT+fAYCVaOTXg8JLHRk43XuU4+tBPr4VthIeGpTn3U2LSMfW5kc59hU0tSFgSn2Koa X-Received: by 2002:a9d:b8f:: with SMTP id 15mr7816849oth.256.1585942984830; Fri, 03 Apr 2020 12:43:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1585942984; cv=none; d=google.com; s=arc-20160816; b=HttRbEc9AjyMWTu8jVxhNoxdZtg8EJkq9bkdfTI9b0KxwGUPL9/29agkLvyJ4g05mP 5NZ+PMwbgPn16Ab3HSXQN1sFZFphNr+2KU5Cg+zK7oeS72czAH+8B/0adOLBwgdUR0he 6w/I6ky+ztNumlX1Hvv4FUdrIcV2drygAVT7E3ZA9Xp2BV32mWDnc7j5YQNTHQ1+4ta6 HMYbOPOsR7hSvA2umEKi39PDTpiW/SzbUWZukcBJqqBWaaVWQxJxYOFDGQ71ooPH1q3A /rSM8TevmboJWI37oYYnrXMoCiuxOSXpqI8I/nS6mAjThDIldqGDqzB7BJLZDHE0qtQj +yhA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=4dfxtheCmKLojADeUREM0/Ruk1iZpcIU6tsCTaFpX6A=; b=ehUue0V0PJLB4krEsbitSM5myy2zW/DmfhqqaZXRFTPhIpuaVkHEyu0YyRJ8Ckr1ft T4zGkC3llx0e7eJq/olgE3EE8qFBfr+kr8XIorX8CgtRdmrZpokjGYlqDFhYTQ3uiSZK bMRQu/QrpVfCiv69b644APpAYSNNvNhopx/a2vwTy8AWR5V8uYxJIuX/lQo/pF9QsqFR 4Tq5wTTPu4qqbpZcgX52RyCKf13qnwtP8HHfQt1ljsJ7nMXLrb8J2I8g3T6YAywmVy28 HqGgMKuusdr+T4sz1IncQ8erCQ17SEO0Iinsly4EHnB82AzFyrVfhZ/tJaGUz40FVyIx OcxA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b19si5316808ots.224.2020.04.03.12.42.52; Fri, 03 Apr 2020 12:43:04 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2390824AbgDCT3I (ORCPT + 99 others); Fri, 3 Apr 2020 15:29:08 -0400 Received: from Galois.linutronix.de ([193.142.43.55]:40905 "EHLO Galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728636AbgDCT3I (ORCPT ); Fri, 3 Apr 2020 15:29:08 -0400 Received: from bigeasy by Galois.linutronix.de with local (Exim 4.80) (envelope-from ) id 1jKRzy-00030I-6W; Fri, 03 Apr 2020 21:29:02 +0200 Date: Fri, 3 Apr 2020 21:29:02 +0200 From: Sebastian Andrzej Siewior To: Tejun Heo Cc: kernel test robot , Thomas Gleixner , Ingo Molnar , "Peter Zijlstra (Intel)" , linux-kernel@vger.kernel.org, LKP , Lai Jiangshan Subject: Re: [PATCH v2] workqueue: Remove the warning in wq_worker_sleeping() Message-ID: <20200403192902.ws33fhs5mrxg6dvo@linutronix.de> References: <20200327074308.GY11705@shao2-debian> <20200327175350.rw5gex6cwum3ohnu@linutronix.de> <20200327232959.rpylymw2edhtxuwr@linutronix.de> <20200403145326.GA162390@mtj.duckdns.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20200403145326.GA162390@mtj.duckdns.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2020-04-03 10:53:26 [-0400], Tejun Heo wrote: > Hello, Hello Tejun, > This is not a usual control flow, right? The worker is blocked on something and while invoking schedule() it needs to be preempted by an interrupt which opens interrupts and invokes schedule() as well. Interrupt handler are not allowed to enable interrupts in general. Page-fault handler do so by they happen only while the calling context triggered a page-fault. Since the kernel is always mapped, this does not happen. The async page fault handler is any exception here. I don't find anything else while looking over x86's idtentry. So this makes it highly unusual control flow, yes. > Can we annotate this case specifically > instead of weakening santiy check for generic cases? puh. So if this do_async_page_fault() -> do_page_fault() never happens but only do_async_page_fault() -> kvm_async_pf_task_wait() then kvm_async_pf_task_wait() could invoke preempt_schedule() instead. This would avoid the worker part (and the warning) but is only available for PREEMPTION kernels. And I think the former case might happen. > Thanks. > Sebastian