From patchwork Wed Nov 7 10:18:25 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michal Hocko X-Patchwork-Id: 10672113 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 340C215E9 for ; Wed, 7 Nov 2018 10:18:47 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 237C52B1F2 for ; Wed, 7 Nov 2018 10:18:47 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 174CA2B221; Wed, 7 Nov 2018 10:18:47 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id AAE612B1F2 for ; Wed, 7 Nov 2018 10:18:46 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 6F7DD6B04DD; Wed, 7 Nov 2018 05:18:45 -0500 (EST) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id 6A56D6B04DF; Wed, 7 Nov 2018 05:18:45 -0500 (EST) X-Original-To: int-list-linux-mm@kvack.org X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 56FAA6B04E0; Wed, 7 Nov 2018 05:18:45 -0500 (EST) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from mail-wr1-f72.google.com (mail-wr1-f72.google.com [209.85.221.72]) by kanga.kvack.org (Postfix) with ESMTP id F086B6B04DD for ; Wed, 7 Nov 2018 05:18:44 -0500 (EST) Received: by mail-wr1-f72.google.com with SMTP id 88-v6so14887528wrp.21 for ; Wed, 07 Nov 2018 02:18:44 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-original-authentication-results:x-gm-message-state:from:to:cc :subject:date:message-id:mime-version:content-transfer-encoding; bh=sxkTZHicSbXm+D7X6j1gdenRf/8OtsBZxrvgNV+3/Pg=; b=fMaAnpwiK+yI76VrZ/wVvqUBSaJkn5yDQsQpjZj118ezS6C97OiNdEPek9BT5O6++F sW1RJtzJWtQrKXhUDwpSHaAklzuhY4O5vVoRoozPd16Qw0YfwQ8J6jzOrT3gHnzK+Ip4 dRVBctbh7NCRmJgNKjBOnGRjSbSEIxIg+yKICfXewh2xkokpC9F4bavqcD/HOYA4VzYJ D8F3dVGclsJxhxCVkm4Jc8qXiLYV/fTgvQdQPOqmTgSA/Z+F9Z4Kwkv0RyZLzq0kvsV2 Cw390iH1ZrwTJW31guJUUczFIPQ/hpCsv5dkvLNHhSfo+pR0xb+9BAYz0cjyGAtlajWy +4vQ== X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of mstsxfx@gmail.com designates 209.85.220.65 as permitted sender) smtp.mailfrom=mstsxfx@gmail.com; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org X-Gm-Message-State: AGRZ1gL54AFA+tWKEODlTuGdNORVRzt2MHTtxex3QhaYf/ZzdU05hgVV 9bd0olz6mf2J3RliAVZKeq8P0yQmQ+LyRJk1YVEAkuyS6pbIxLStU5ivavhIJ7cWOiMfvi9M26z fowTk1F2QeNYzv3H+77KTosBJsg/AurECXCk5yRb/nI/AOzoAqBqzfYqBpbDEPPWPh+YC3PDHpb HOxSehQ6waovDMjvQlhrl9BB57eMPFW0NzoS0HP9MSZu2dbj8m8ZSvBMXK5fUZ1AjE+WmHJjz+8 FECSuwnT7Il9zYj7YPUgfTrYVQcHkYcbnzSY4GPNKMj4y6fJzrevuKjkgzy/NFIxVTHO3j7WUNY eGqPcG/umy7WW1R7s3Uf8iZoj+Vf4+sq5f/Ukft6YPLL4eH9HDZtl+UQm/9bHHebeluaWgxu/g= = X-Received: by 2002:a1c:6c0f:: with SMTP id h15-v6mr1370168wmc.123.1541585924449; Wed, 07 Nov 2018 02:18:44 -0800 (PST) X-Received: by 2002:a1c:6c0f:: with SMTP id h15-v6mr1370117wmc.123.1541585923566; Wed, 07 Nov 2018 02:18:43 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1541585923; cv=none; d=google.com; s=arc-20160816; b=uZe2Fb0Cke946TKza00gWnUETPk00pDOjexh/PxbramL+f66xgmrkLE7emkm5NMKfM 4axNTXBxIxL+xX+DTImAXd1IYLqF0F8gdmV84NSzVo9aBDd+F4QJrfRKh6CkrdgWRuVx 7WQNU9lDrhaY+5UprCGTenskSLhhyDvOXo/acy0dkPMK53d34qGNNk78FLcYvnAeXVcD wasZ/2eC+7Ix3EK+DlmE+8RAdPHIlRCEuQ2u0Vs4KUvep9jJqofhT1gB5ewN4DsqoY0U cT7MWO04u0MCQDDGL6c64D2KDeNerU5P7nZfToUINCmbi4Xy+RG8GZgu+ZVhx5BiycP5 HD/A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from; bh=sxkTZHicSbXm+D7X6j1gdenRf/8OtsBZxrvgNV+3/Pg=; b=jAC0MUWJsUjM6k0ROUa/wfzluY79XA/otbUuy5AvtLdhxKvcZsATB2JbegvrK7eAcE hB5n1IyET01umqb2SylUolaathECH3rjVei2NZroBKL2VLdpL6J5Cv/G83jyyhVMBSHO GYMM6LzRVdknne1fIt/iJmAMmq5DV1y5AiVc0pp5UNUEMux4dbwNpYbJk9ckX4c3azJR 29WTfLVYnIf1/ljYLbTVlWw/LdjCoe56Tdd6etyGE38NjW3DE2ZQezV0yOlIYeIf8nHo dqjA5HPZ7cUO3TLYvLSCShM6kPHg4dUie927Kx+6769Z1jwd7jHFOpFlF8iBhgUyjrw1 vkhg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of mstsxfx@gmail.com designates 209.85.220.65 as permitted sender) smtp.mailfrom=mstsxfx@gmail.com; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from mail-sor-f65.google.com (mail-sor-f65.google.com. [209.85.220.65]) by mx.google.com with SMTPS id z3-v6sor176996wru.7.2018.11.07.02.18.43 for (Google Transport Security); Wed, 07 Nov 2018 02:18:43 -0800 (PST) Received-SPF: pass (google.com: domain of mstsxfx@gmail.com designates 209.85.220.65 as permitted sender) client-ip=209.85.220.65; Authentication-Results: mx.google.com; spf=pass (google.com: domain of mstsxfx@gmail.com designates 209.85.220.65 as permitted sender) smtp.mailfrom=mstsxfx@gmail.com; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org X-Google-Smtp-Source: AJdET5da/PJmeqaS7uG3tevVjQEiAicJwUhwTYG/DXJZBvyXu+4NAQE6fmMLtBUfV9NkYzZKD8BCcg== X-Received: by 2002:a05:6000:1048:: with SMTP id c8mr1278377wrx.171.1541585922651; Wed, 07 Nov 2018 02:18:42 -0800 (PST) Received: from tiehlicka.suse.cz (ip-37-188-140-85.eurotel.cz. [37.188.140.85]) by smtp.gmail.com with ESMTPSA id w18-v6sm217527wrn.66.2018.11.07.02.18.41 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 07 Nov 2018 02:18:42 -0800 (PST) From: Michal Hocko To: Cc: Andrew Morton , Oscar Salvador , Baoquan He , LKML Subject: [RFC PATCH 0/5] mm, memory_hotplug: improve memory offlining failures debugging Date: Wed, 7 Nov 2018 11:18:25 +0100 Message-Id: <20181107101830.17405-1-mhocko@kernel.org> X-Mailer: git-send-email 2.19.1 MIME-Version: 1.0 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: X-Virus-Scanned: ClamAV using ClamSMTP Hi, I have been promissing to improve memory offlining failures debugging for quite some time. As things stand now we get only very limited information in the kernel log when the offlining fails. It is usually only [ 1984.506184] rac1 kernel: memory offlining [mem 0x82600000000-0x8267fffffff] failed without no further details. We do not know what exactly fails and for what reason. Whenever I was forced to debug such a failure I've always had to do a debugging patch to tell me more. We can enable some tracepoints but it would be much better to get a better picture without using them. This patch series does 2 things. The first one is to make dump_page more usable by printing more information about the mapping patch 1. Then it reduces the log level from emerg to warning so that this function is usable from less critical context patch 2. Then I have added more detailed information about the offlining failure patch 4 and finally add dump_page to isolation and offlining migration paths. Patch 3 is a trivial cleanup. Does this look go to you? Shortlog Michal Hocko (5): mm: print more information about mapping in __dump_page mm: lower the printk loglevel for __dump_page messages mm, memory_hotplug: drop pointless block alignment checks from __offline_pages mm, memory_hotplug: print reason for the offlining failure mm, memory_hotplug: be more verbose for memory offline failures Diffstat: mm/debug.c | 23 ++++++++++++++++++----- mm/memory_hotplug.c | 52 +++++++++++++++++++++++++++++++--------------------- mm/page_alloc.c | 1 + 3 files changed, 50 insertions(+), 26 deletions(-)