Received: by 2002:a25:824b:0:0:0:0:0 with SMTP id d11csp682583ybn; Wed, 25 Sep 2019 06:14:59 -0700 (PDT) X-Google-Smtp-Source: APXvYqwG3NXe35qaMsFAhDtd6RtVcJdR5twbNQzHP6uqB9Kkw0xZtR0ZyRSkH1oJtMSuCVNg5ETc X-Received: by 2002:a17:906:d185:: with SMTP id c5mr3988538ejz.139.1569417298970; Wed, 25 Sep 2019 06:14:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1569417298; cv=none; d=google.com; s=arc-20160816; b=wZQziOU3JmYmyDdq7mP66VKfGS4HVh75W4JnWw3hDjr5pHjS8PLXlhPqqAkD25uZ0e so+n9gm9pyFPM/VvWqX+Th2sQ1MTikaxuJgva56m1oZI9R9d4sT9Gh1hIWj9SQxkHn8X F2wa9w6tFDLH+JC3x8+QvD0MWLC4FA6KgI3aQvaz1mWjlELY7YV9K0k83KXuf/LMYztj 2b96cg48DMCsRcciTAZyqlfjylFWJZsiWf4dmwZPP4BQLgn5efaaM8Ikg8msMCauy387 l1AvSp1IEFJbGPK/JRjf0wWGbVbdUYlekJPoim0Bov2WMwZxXMc3iShrK2Pw1PWKgk0W lLsw== 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=IFJU4w4Zit5qumc+rQtviMPaHhleumxz6B9n+ZDwoNg=; b=nHLpFnhVeromVVPBH4dmB0GfSdFZThrhuT6KDFdx1dVJ8CceCGFqejTJYmbITM5xnr +U/XDUHdzOFZLj3EFAL42ZUa8/HHjH+PxIBE3w5E70SEnNgQvxhTDNpOT/psrqAGW0qW Yg7mEQyljiJ7/TdgYtBIiXilMhe7UrRAsLUlpiPfsXHWlxR0CbQz6UeGqymyvKRXKwDP uan/zMOiznGJBQO4LFtdVGjHMwNN9VZg5Ao4LplrGzRpxOhqnTj6pvLX8Rda3SeNYAxt hv9o36uuOclkwx88ngHB4KmZZGAI3ga/N+syadzHKm2o9jIUBKQ9McOtdnrhf8tzWac7 3ZdQ== 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 g25si3087905eds.210.2019.09.25.06.14.32; Wed, 25 Sep 2019 06:14:58 -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 S2394664AbfIWM6z (ORCPT + 99 others); Mon, 23 Sep 2019 08:58:55 -0400 Received: from mx2.suse.de ([195.135.220.15]:40300 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S2394080AbfIWM6y (ORCPT ); Mon, 23 Sep 2019 08:58:54 -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 B0111AF4E; Mon, 23 Sep 2019 12:58:52 +0000 (UTC) Date: Mon, 23 Sep 2019 14:58:51 +0200 From: Petr Mladek To: Sergey Senozhatsky Cc: Qian Cai , Catalin Marinas , Arnd Bergmann , Sergey Senozhatsky , Steven Rostedt , Peter Zijlstra , Dan Williams , Will Deacon , linux-mm@kvack.org, Thomas Gleixner , Greg Kroah-Hartman , linux-arm-kernel@lists.infradead.org, Theodore Ts'o , Waiman Long , linux-kernel@vger.kernel.org Subject: Re: printk() + memory offline deadlock (WAS Re: page_alloc.shuffle=1 + CONFIG_PROVE_LOCKING=y = arm64 hang) Message-ID: <20190923125851.cykw55jpqwlerjrz@pathway.suse.cz> References: <1566509603.5576.10.camel@lca.pw> <1567717680.5576.104.camel@lca.pw> <1568128954.5576.129.camel@lca.pw> <20190911011008.GA4420@jagdpanzerIV> <1568289941.5576.140.camel@lca.pw> <20190916104239.124fc2e5@gandalf.local.home> <1568817579.5576.172.camel@lca.pw> <20190918155059.GA158834@tigerII.localdomain> <1568823006.5576.178.camel@lca.pw> <20190923102100.GA1171@jagdpanzerIV> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190923102100.GA1171@jagdpanzerIV> 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-09-23 19:21:00, Sergey Senozhatsky wrote: > So we have > > port->lock -> MM -> zone->lock > // from pty_write()->__tty_buffer_request_room()->kmalloc() > > vs > > zone->lock -> printk() -> port->lock > // from __offline_pages()->__offline_isolated_pages()->printk() If I understand it correctly then this is the re-appearing problem. The only systematic solution with the current approach is to take port->lock in printk_safe/printk_deferred context. But this is a massive change that almost nobody wants. Instead, we want the changes that were discussed on Plumbers. Now, the question is what to do with existing kernels. There were several lockdep reports. And I am a bit lost. Did anyone seen real deadlocks or just the lockdep reports? To be clear. I would feel more comfortable when there are no deadlocks. But I also do not want to invest too much time into old kernels. All these problems were there for ages. We could finally see them because lockdep was enabled in printk() thanks to printk_safe. Well, it is getting worse over time with the increasing complexity and number of debugging messages. > A number of debugging options make the kernel less stable. > Sad but true. Yeah. The only good thing is that most debug options are not enabled on production systems. It is not an excuse for ignoring the problems. But it might be important for prioritizing. Best Regards, Petr