Received: by 2002:a5b:505:0:0:0:0:0 with SMTP id o5csp913358ybp; Fri, 4 Oct 2019 06:59:12 -0700 (PDT) X-Google-Smtp-Source: APXvYqyHB5ettdaEagtEiHaWIi+2B09iqf03cO0LokV/3pUxTOmYZN7CHiDe+XMhsjPQmQab6Wmy X-Received: by 2002:a17:906:4c4c:: with SMTP id d12mr12274168ejw.174.1570197552871; Fri, 04 Oct 2019 06:59:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1570197552; cv=none; d=google.com; s=arc-20160816; b=LPrGbL2mpGx8utDm5H/6YaYgd7Tc4xWDDLIRqyOnrfOXjiFdNXvKu1PKDA8mrcZ+w7 SLr7VfG7og3QcVYQD72gnn9zBmH8cHFY5VYW5sabMZr9uC0XNXbjwH2wOMiGyzT4WTie 43CSaDcItMq0yvFLpAYa5c9G5JIkuf6Cqnh6FNx1cKJVFeAhHpACF5+fENSzuER9qUOs 3JPNXMymnrVQVoZ3Q9V/i5j+teWxEhKBAk9gTDa1+C03eljGtEy8fuzwUSsdn548otlj Id14G3hsJRamX4FFOYe1Wcf7dIk/hKGNnM9YbAEbSBffVscoi0Ndhx+sbkTm/onle3ht lKzw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:date:cc:to:from:subject:message-id :dkim-signature; bh=g2Il7BaECJsWIskdenM7M97r0s/NvzNhUCufnwSYYzs=; b=aKUspjHjyYsYAj29hwUiipFdBvKZFicWL5gQzJZ1Asq6s7kYHwkI74/3VQXpDWe/DL iX5u2OkRIpYXmL7+x9RcDpiT8quGImLcQCQvQura6BSNqiKow0eiC0DpwwjF9E31MoqT 4F0WaO+T2uBydjQmd2+W7LnzECI8zGQjaiq/VZYf0FskwqYjo0vTZQ+KR48nucpvGIRq xeNOQLu0O07CuYAM8eHp1YpUWuCpeffvcRnPcn5zKrVQ+/d1EK8xyUZ+aeB8hcocRVsO qayJajzoVI5cet7diapVAmCS1rRGLHcWzKXFJr1+x2btoU6W9V4MW5zuUWAUvJOWD2Vp l9xg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@lca.pw header.s=google header.b=PsIURk83; 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 i11si3010545eja.317.2019.10.04.06.58.48; Fri, 04 Oct 2019 06:59:12 -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; dkim=pass header.i=@lca.pw header.s=google header.b=PsIURk83; 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 S2388891AbfJDN4E (ORCPT + 99 others); Fri, 4 Oct 2019 09:56:04 -0400 Received: from mail-qk1-f195.google.com ([209.85.222.195]:45703 "EHLO mail-qk1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388491AbfJDN4E (ORCPT ); Fri, 4 Oct 2019 09:56:04 -0400 Received: by mail-qk1-f195.google.com with SMTP id z67so5818430qkb.12 for ; Fri, 04 Oct 2019 06:56:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=lca.pw; s=google; h=message-id:subject:from:to:cc:date:in-reply-to:references :mime-version:content-transfer-encoding; bh=g2Il7BaECJsWIskdenM7M97r0s/NvzNhUCufnwSYYzs=; b=PsIURk83Pa180b008RSqEfoYKXR+bbjKVuxA6hrfm8Px55/gcwWAsuAh+rpSU3nzTM gTkhzm7mpfggtQKmzS0fchLdmPd9ko8elm0j981km/uPdV5rYu4qMaPpqcEHyHOubyry qVMsCOrfNa6xshEdj6HHAw7g76Gu6MmBZAAXr1PJDzlrvc1eQVARTR4oNHg/rkw8uIeO LGxO8X5yCnWW7TsWXOEBuFqrarw7JwFiOVL2DaTcwrIIB3bLH+gbihRBQozv6MstIV2v Xl0EwxPaXKVY4iYAz3kON+MEnOlgSRLhmTZAfp3e/Gz6pflmiQCS519P0J6hjh9fHPFt 3ifA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:message-id:subject:from:to:cc:date:in-reply-to :references:mime-version:content-transfer-encoding; bh=g2Il7BaECJsWIskdenM7M97r0s/NvzNhUCufnwSYYzs=; b=lHePmG7ClFmxgD4AXXV6keeNHSzHOl4B59XuWKxUiZ6AkryloY108W4flRyGBZPR7p BNluiZf2aCRDEC8ybD1xCtycB0sYA4SIyfPOfMxvqHQ/bYbgviXEZs4b40kaNjSLGVRJ iY/oyk3KcW7JIt4vln7/HQkVuDV1Y+v1h6ih9v/IAhP5qkn+pvvRvZwPkHjKA0wC+ud3 ovPuLF7mb/8agSdeUG6Jr/UmJKO2BkcU4+pZKJawdqZXUvzwD14Pw54uA9YBIy+LS6KD WOjQITNM8EMRZb2YcSBB8HwmWG6jVc6tDFFNl0BEQzFrx0eamg/nRzv2EFZxobwgPcPf cfTA== X-Gm-Message-State: APjAAAXdLWj/5Viaj/2A96MHCq2GSDVVRC9v9nqGn3UnCrhLd/Jhikyu kFOfSuUG2dW131ClklVPYWt5tA== X-Received: by 2002:a37:8cc6:: with SMTP id o189mr10362919qkd.82.1570197363305; Fri, 04 Oct 2019 06:56:03 -0700 (PDT) Received: from dhcp-41-57.bos.redhat.com (nat-pool-bos-t.redhat.com. [66.187.233.206]) by smtp.gmail.com with ESMTPSA id q64sm3453144qkb.32.2019.10.04.06.56.01 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 04 Oct 2019 06:56:02 -0700 (PDT) Message-ID: <1570197360.5576.275.camel@lca.pw> Subject: Re: [PATCH] mm/page_alloc: Add a reason for reserved pages in has_unmovable_pages() From: Qian Cai To: Michal Hocko Cc: Anshuman Khandual , linux-mm@kvack.org, Andrew Morton , Vlastimil Babka , Oscar Salvador , Mel Gorman , Mike Rapoport , Dan Williams , Pavel Tatashin , linux-kernel@vger.kernel.org Date: Fri, 04 Oct 2019 09:56:00 -0400 In-Reply-To: <20191004133814.GM9578@dhcp22.suse.cz> References: <1570090257-25001-1-git-send-email-anshuman.khandual@arm.com> <20191004105824.GD9578@dhcp22.suse.cz> <91128b73-9a47-100b-d3de-e83f0b941e9f@arm.com> <1570193776.5576.270.camel@lca.pw> <20191004130713.GK9578@dhcp22.suse.cz> <1570195839.5576.273.camel@lca.pw> <20191004133814.GM9578@dhcp22.suse.cz> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.22.6 (3.22.6-10.el7) Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, 2019-10-04 at 15:38 +0200, Michal Hocko wrote: > On Fri 04-10-19 09:30:39, Qian Cai wrote: > > On Fri, 2019-10-04 at 15:07 +0200, Michal Hocko wrote: > > > On Fri 04-10-19 08:56:16, Qian Cai wrote: > > > [...] > > > > It might be a good time to rethink if it is really a good idea to dump_page() > > > > at all inside has_unmovable_pages(). As it is right now, it is a a potential > > > > deadlock between console vs memory offline. More details are in this thread, > > > > > > > > https://lore.kernel.org/lkml/1568817579.5576.172.camel@lca.pw/ > > > > > > Huh. That would imply we cannot do any printk from that path, no? > > > > Yes, or use something like printk_deferred() > > This is just insane. The hotplug code is in no way special wrt printk. > It is never called from the printk code AFAIK and thus there is no real > reason why this particular code should be any special. Not to mention > it calls printk indirectly from a code that is shared with other code > paths. Basically, printk() while holding the zone_lock will be problematic as console is doing the opposite as it always needs to allocate some memory. Then, it will always find some way to form this chain, console_lock -> * -> zone_lock. > > > or it needs to rework of the current console locking which I have no > > clue yet. > > Yes, if the lockdep is really referring to a real deadlock which I > haven't really explored. >