From patchwork Wed Jul 1 22:14:18 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bhupesh Sharma X-Patchwork-Id: 11637421 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 4E1CE912 for ; Wed, 1 Jul 2020 22:14:51 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 124ED20853 for ; Wed, 1 Jul 2020 22:14:51 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="ZwDyC1Yg" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 124ED20853 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 084EA8D002E; Wed, 1 Jul 2020 18:14:50 -0400 (EDT) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id 00E788D002B; Wed, 1 Jul 2020 18:14:49 -0400 (EDT) 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 E21AD8D0056; Wed, 1 Jul 2020 18:14:49 -0400 (EDT) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0012.hostedemail.com [216.40.44.12]) by kanga.kvack.org (Postfix) with ESMTP id C6C058D002B for ; Wed, 1 Jul 2020 18:14:49 -0400 (EDT) Received: from smtpin22.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay04.hostedemail.com (Postfix) with ESMTP id 2B0981EF3 for ; Wed, 1 Jul 2020 22:14:49 +0000 (UTC) X-FDA: 76990912698.22.bone99_59041a426e84 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin22.hostedemail.com (Postfix) with ESMTP id 01D7E18038E68 for ; Wed, 1 Jul 2020 22:14:48 +0000 (UTC) X-Spam-Summary: 1,0,0,,d41d8cd98f00b204,bhsharma@redhat.com,,RULES_HIT:30054,0,RBL:205.139.110.120:@redhat.com:.lbl8.mailshell.net-66.10.201.10 62.18.0.100;04yra1xe8nm8sk7dzbxepwn81ax84op1z9pcmnixeyftnahmmp3mc5iniz8n8kp.azyy1nfr8mtp67f64pq7z8kb35gwy7mco7qfhig1orgyhcgc3q439w4geqc7zua.o-lbl8.mailshell.net-223.238.255.100,CacheIP:none,Bayesian:0.5,0.5,0.5,Netcheck:none,DomainCache:0,MSF:not bulk,SPF:ft,MSBL:0,DNSBL:neutral,Custom_rules:0:0:0,LFtime:23,LUA_SUMMARY:none X-HE-Tag: bone99_59041a426e84 X-Filterd-Recvd-Size: 5051 Received: from us-smtp-1.mimecast.com (us-smtp-delivery-1.mimecast.com [205.139.110.120]) by imf10.hostedemail.com (Postfix) with ESMTP for ; Wed, 1 Jul 2020 22:14:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1593641687; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:content-type:content-type; bh=glPotn+K1T613CjdKByq3iS5Ne25OlUyrCXDnz2IEJI=; b=ZwDyC1YgqHkJOXyYlKGqLa8IWsWhRApCdt7BoDOUwKKxHcUcMN6Ez1dPNLxNfC2BGQOxd3 2lVv28SGr0igPhCdIatDYlxenRFOQ+pVMoth+lrMH6ns3rsXuUgxoYO+2DOPzcBcN7Zu+Q 6Nw+6rIF/DiB1qeJrTrAZeZctoD6BbM= Received: from mail-pg1-f199.google.com (mail-pg1-f199.google.com [209.85.215.199]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-196-QHAZOr15M5SR8Jv5mRPFcw-1; Wed, 01 Jul 2020 18:14:43 -0400 X-MC-Unique: QHAZOr15M5SR8Jv5mRPFcw-1 Received: by mail-pg1-f199.google.com with SMTP id m7so18961940pgv.12 for ; Wed, 01 Jul 2020 15:14:42 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=glPotn+K1T613CjdKByq3iS5Ne25OlUyrCXDnz2IEJI=; b=JzRIv/ax0xW1Qj3GPfeu67VUPxzfCp6d+ldEEiw8d/t4jMSFH8xTYocpjrmsjhj8Ej kWzJwrwcBuRQeLLAzxXP7PB7Sb1FCiRUo5KaqoPInab3u75QkiSRBH7Q7DIh/Jyq83AY QBuWmpknaxMKj+7EXCOuvYAVYdZg1yKIQyulAs6dsa9EmCOPpv4t0ih9yjBzQPxf1Dxt A/1PKJylNzOiNjhPm4qi+jAyjTL224ohVSbMoZgcYZnlAtIs9TTdtZ2aG35N9FKkp6C/ Vin73wXvAY4rPWZbsqflW/JCpW44q4uQffeODTx+xAWOq0QjHHgL2t55Hcd747WOnoxS Xcow== X-Gm-Message-State: AOAM530tegVGt/MsUUFwfjpo+XfUkeaeD+yWz73SdYrge1Y0Ld7Wyzg5 Xyb9CdvwF5nT0s4/97EVAAaEuXz/sxKQZVAXV7b+2PPF2Cl9SDUJBvMULl+p7/sX+H6Ts8sknz9 8JI5Bl3dneHI= X-Received: by 2002:a17:90a:c295:: with SMTP id f21mr17700628pjt.208.1593641681958; Wed, 01 Jul 2020 15:14:41 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxPvPqACXXwd/bD0e/FXP/qE7VfvMYJ9AYKG238E3SOIkFKDcqV3tvp0NbqgZNbAots/y7ygA== X-Received: by 2002:a17:90a:c295:: with SMTP id f21mr17700609pjt.208.1593641681705; Wed, 01 Jul 2020 15:14:41 -0700 (PDT) Received: from localhost ([110.227.183.4]) by smtp.gmail.com with ESMTPSA id i196sm6902130pgc.55.2020.07.01.15.14.40 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 01 Jul 2020 15:14:41 -0700 (PDT) From: Bhupesh Sharma To: cgroups@vger.kernel.org, linux-mm@kvack.org, linux-arm-kernel@lists.infradead.org Cc: bhsharma@redhat.com, bhupesh.linux@gmail.com, Johannes Weiner , Michal Hocko , Vladimir Davydov , James Morse , Mark Rutland , Will Deacon , Catalin Marinas , linux-kernel@vger.kernel.org, kexec@lists.infradead.org Subject: [PATCH 0/2] arm64/kdump: Fix OOPS and OOM issues in kdump kernel Date: Thu, 2 Jul 2020 03:44:18 +0530 Message-Id: <1593641660-13254-1-git-send-email-bhsharma@redhat.com> X-Mailer: git-send-email 2.7.4 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=bhsharma@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com X-Rspamd-Queue-Id: 01D7E18038E68 X-Spamd-Result: default: False [0.00 / 100.00] X-Rspamd-Server: rspam03 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: Prabhakar recently reported a kdump kernel boot failure on ThunderX2 arm64 plaforms (which I was able to reproduce on ampere arm64 machines as well), (see [1]), which is seen when a corner case is hit on some arm64 boards when kdump kernel runs with "cgroup_disable=memory" passed to the kdump kernel (via bootargs) and the crashkernel was originally allocated from either a ZONE_DMA32 memory or mixture of memory chunks belonging to both ZONE_DMA and ZONE_DMA32 regions. While [PATCH 1/2] fixes the OOPS inside mem_cgroup_get_nr_swap_pages() function, [PATCH 2/2] fixes the OOM seen inside the kdump kernel by allocating the crashkernel inside ZONE_DMA region only. [1]. https://marc.info/?l=kexec&m=158954035710703&w=4 Cc: Johannes Weiner Cc: Michal Hocko Cc: Vladimir Davydov Cc: James Morse Cc: Mark Rutland Cc: Will Deacon Cc: Catalin Marinas Cc: cgroups@vger.kernel.org Cc: linux-mm@kvack.org Cc: linux-arm-kernel@lists.infradead.org Cc: linux-kernel@vger.kernel.org Cc: kexec@lists.infradead.org Reported-by: Prabhakar Kushwaha Signed-off-by: Bhupesh Sharma Bhupesh Sharma (2): mm/memcontrol: Fix OOPS inside mem_cgroup_get_nr_swap_pages() arm64: Allocate crashkernel always in ZONE_DMA arch/arm64/mm/init.c | 16 ++++++++++++++-- mm/memcontrol.c | 9 ++++++++- 2 files changed, 22 insertions(+), 3 deletions(-)