Received: by 2002:a5b:505:0:0:0:0:0 with SMTP id o5csp5635103ybp; Tue, 8 Oct 2019 06:09:43 -0700 (PDT) X-Google-Smtp-Source: APXvYqykJZE76LJl4UNVx5qWyjpyhnOKrJZ18hsZNq/xAn1xk7Lho5w0RdzWuCWLz2Bhm/Ect8fd X-Received: by 2002:a50:934c:: with SMTP id n12mr34359321eda.12.1570540183258; Tue, 08 Oct 2019 06:09:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1570540183; cv=none; d=google.com; s=arc-20160816; b=VHgoRbkWD/p8EbASIHWW6BmZvj3Lj+1Z20qvX23L8/nZozgE9o7vpoQgQ86MYZA7MB H/f5cxHhzGyv98FxivBxiE2bG2b+F18mj7Z8r2Se2Jevh4DSNQC/en5h7Jc3RateMoIp ZvZyuuyLA9AnXoedfHj4vvFns/N55w9uo+BbRUtF3IM7AEedDY+Ixc1ZbnzMCeuXsT86 XMaSSLbAY8e/XgWOg+/6BtTBthoXK7MLpF7lJ8CAJfsTq+hMssCzHELNYjWni2P+4Ji3 /ur4nQ5sh9lMdF4mt+j4xsn8pdtFiQSFdJtAEgetdUjZgZlUVJPLG98m4sY0MNu4zjQ8 7gMA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=WISfS/gdxR29RlGlMIGz3s/bP7pW/csdwHJk4Cloo5U=; b=fIfTPJQNF2E6M+NsIoatKYqp/im3AAy1lTXtbS4OAJ93M9scwsga3xPP3CKmXXV57Q +zIW++AkuZQnMwYkxTSYRG7LZ6cwv083Q2r3+n2e4/zSNgKIEi46cykEWIm31O1QdUvX yteqsOe28P5sVLb/eFr91OaH4AyAom0cAEpLFtJZ09nxDcN2XdRW+RT8Fux+h+KkQx4e PUmEVEG66LpT35Kp4tVWs2vULScZMAApD1d+cn16gGN7+ogQ7wZULeht26rK8Tiez3P7 G0spZD/cForlBGjzzWGU9e+F72PbwOzULxZNVWeVQ1b4VXECa8nXdjsYXBWIEItfzb8T n/vw== 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 ch13si3162915ejb.203.2019.10.08.06.09.13; Tue, 08 Oct 2019 06:09:43 -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 S1730964AbfJHNIG (ORCPT + 99 others); Tue, 8 Oct 2019 09:08:06 -0400 Received: from mx2.suse.de ([195.135.220.15]:52568 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1730583AbfJHNIG (ORCPT ); Tue, 8 Oct 2019 09:08:06 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id 909EDB147; Tue, 8 Oct 2019 13:08:04 +0000 (UTC) Date: Tue, 8 Oct 2019 15:08:03 +0200 From: Petr Mladek To: Qian Cai Cc: sergey.senozhatsky.work@gmail.com, rostedt@goodmis.org, peterz@infradead.org, mhocko@kernel.org, linux-mm@kvack.org, john.ogness@linutronix.de, akpm@linux-foundation.org, david@redhat.com, linux-kernel@vger.kernel.org Subject: Re: [PATCH v2] mm/page_isolation: fix a deadlock with printk() Message-ID: <20191008130803.jf3xdtyt3qpfotn5@pathway.suse.cz> References: <1570228005-24979-1-git-send-email-cai@lca.pw> <20191007143002.l37bt2lzqtnqjqxu@pathway.suse.cz> <1570460350.5576.290.camel@lca.pw> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1570460350.5576.290.camel@lca.pw> User-Agent: NeoMutt/20170912 (1.9.0) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon 2019-10-07 10:59:10, Qian Cai wrote: > It is almost impossible to eliminate all the indirect call chains from > console_sem/console_owner_lock to zone->lock because it is too normal that > something later needs to allocate some memory dynamically, so as long as it > directly call printk() with zone->lock held, it will be in trouble. It is not normal the something needs to allocate memory under console_sem. Console drivers are supposed to get the message out even when the system is in really bad state and it is not possible to allocate memory. I consider this a bug in the console driver. > I really hope the new printk() will solve this class of the problem, but it is > essentially up to the air until a patchset was posted. There are just too many > questions out there to be answered. The new printk should prevent all deadlocks simply because it will be fully lockless. The console drivers will be called from dedicated kthreads and therefore from a well defined context. Best Regards, Petr