Received: by 2002:a25:683:0:0:0:0:0 with SMTP id 125csp435194ybg; Wed, 10 Jun 2020 04:49:22 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx3TWMTbBvQ4R7qcXAyFe9d8RjE8zaaBpYdCGd/Qq0E0fQpHs0OZtwsUwCjvVwj0eqZr//x X-Received: by 2002:a17:906:fcae:: with SMTP id qw14mr3137728ejb.166.1591789762559; Wed, 10 Jun 2020 04:49:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1591789762; cv=none; d=google.com; s=arc-20160816; b=sSFXYjhPYhiNlzSveOlIe5xKyITfVRYY+sVYlqWkMuHD/FWiwJWn4EloQ1BFLRMU45 nBmvoaDxVLsrrz2Kua8IuP3UVp2Blh1x+5JVCbPT0+79kSwwqfjbOhfNv33XnpwoPIdx IxqPZ/dduW/jAtEMQHhWDQmovEMHSSU9oSXudxbEtbFhwtrnP35VBIdY8NteHnkdjBat MMFQah3h05sVay381kSEMrJK/0gXWIWbb/KfuYFnxmfgf3obcvQLyGHT+elS3iBmQj2k hanFxsolwN0QTwSop/6UPo2+xk5Usy5AQCSLIJOFuNoQvStv+CLcFSFVwLpuk32TK8Ah keiA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=7/ROs8VQ70jPbtvhHIupekkebzlDViQzE/nQjPt6pUw=; b=yizk2CqCWcgS7oqxc4n9zmQfqc42jqjPBJOZfO1vlw2Bprlbecsv3z9GdaE0b0wrTX Tbbb6l+2GJW1xn1mxtGe+7MRtyrY6LtGEZ+D1/4/eh0pUpHDwt9TIhQCY2P/qNJKVYKA yRumUeHBGWhZ830NYXEmtY4E7KIpK0nnGS1lWux7HBhMPsqv5lSIGDZx6fGaReaZ+pD/ 3GQFMSL92g4GV+W4nIDTx4ZEUkVQw5KixqtFHkdNPRU+oNFUBei8lfEY5z5l+UUxMXlh YP8tJXNmmfCnGRlSsWO9AJgBJ71xUi6kjHls5U+iqTUV8NOPcyQ7ge9eMtvdo+13R8HB r2fw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=ibm.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id s5si11434631ejd.121.2020.06.10.04.48.59; Wed, 10 Jun 2020 04:49:22 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=ibm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728558AbgFJLqy (ORCPT + 99 others); Wed, 10 Jun 2020 07:46:54 -0400 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:24838 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728481AbgFJLqx (ORCPT ); Wed, 10 Jun 2020 07:46:53 -0400 Received: from pps.filterd (m0098404.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id 05ABX93E097528; Wed, 10 Jun 2020 07:46:48 -0400 Received: from pps.reinject (localhost [127.0.0.1]) by mx0a-001b2d01.pphosted.com with ESMTP id 31jbvjwwsy-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 10 Jun 2020 07:46:48 -0400 Received: from m0098404.ppops.net (m0098404.ppops.net [127.0.0.1]) by pps.reinject (8.16.0.36/8.16.0.36) with SMTP id 05ABY7J9101982; Wed, 10 Jun 2020 07:46:47 -0400 Received: from ppma01fra.de.ibm.com (46.49.7a9f.ip4.static.sl-reverse.com [159.122.73.70]) by mx0a-001b2d01.pphosted.com with ESMTP id 31jbvjww6f-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 10 Jun 2020 07:46:47 -0400 Received: from pps.filterd (ppma01fra.de.ibm.com [127.0.0.1]) by ppma01fra.de.ibm.com (8.16.0.42/8.16.0.42) with SMTP id 05ABjMMJ001316; Wed, 10 Jun 2020 11:45:28 GMT Received: from b06avi18878370.portsmouth.uk.ibm.com (b06avi18878370.portsmouth.uk.ibm.com [9.149.26.194]) by ppma01fra.de.ibm.com with ESMTP id 31g2s7u4ht-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 10 Jun 2020 11:45:28 +0000 Received: from d06av26.portsmouth.uk.ibm.com (d06av26.portsmouth.uk.ibm.com [9.149.105.62]) by b06avi18878370.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 05ABjPtt56623548 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 10 Jun 2020 11:45:25 GMT Received: from d06av26.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 51090AE045; Wed, 10 Jun 2020 11:45:25 +0000 (GMT) Received: from d06av26.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id DF756AE04D; Wed, 10 Jun 2020 11:45:24 +0000 (GMT) Received: from osiris (unknown [9.171.62.218]) by d06av26.portsmouth.uk.ibm.com (Postfix) with ESMTPS; Wed, 10 Jun 2020 11:45:24 +0000 (GMT) Date: Wed, 10 Jun 2020 13:45:23 +0200 From: Heiko Carstens To: David Hildenbrand Cc: linux-kernel@vger.kernel.org, linux-mm@kvack.org, linux-s390@vger.kernel.org, Vasily Gorbik , Christian Borntraeger , Philipp Rudo , Kirill Smelkov , Alexander Egorenkov Subject: Re: [PATCH RFC 1/2] s390/zcore: traverse resources instead of memblocks Message-ID: <20200610114523.GA5943@osiris> References: <20200417150151.17239-1-david@redhat.com> <20200417150151.17239-2-david@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200417150151.17239-2-david@redhat.com> X-TM-AS-GCONF: 00 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.216,18.0.687 definitions=2020-06-10_07:2020-06-10,2020-06-10 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 lowpriorityscore=0 priorityscore=1501 mlxlogscore=999 malwarescore=0 impostorscore=0 cotscore=-2147483648 suspectscore=1 mlxscore=0 clxscore=1011 adultscore=0 spamscore=0 bulkscore=0 phishscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2004280000 definitions=main-2006100088 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Apr 17, 2020 at 05:01:50PM +0200, David Hildenbrand wrote: > The zcore memmap basically contains the first level of all system RAM from > /proc/iomem. We want to disable CONFIG_ARCH_KEEP_MEMBLOCK (e.g., to not > create memblocks for hotplugged/standby memory and save space), switch to > traversing system ram resources instead. During early boot, we create > resources for all early memblocks (including the crash kernel area). When > adding standby memory, we currently create both, memblocks and resources. > > Note: As we don't have memory hotplug after boot (standby memory is added > via sclp during boot), we don't have to worry about races. > > I am only able to test under KVM (where I hacked up zcore to still > create the memmap file) > > root@vm0:~# cat /proc/iomem > 00000000-2fffffff : System RAM > 10424000-10ec6fff : Kernel code > 10ec7000-1139a0e3 : Kernel data > 1177a000-11850fff : Kernel bss > 30000000-3fffffff : Crash kernel > > Result without this patch: > root@vm0:~# cat /sys/kernel/debug/zcore/memmap > 0000000000000000 0000000040000000 > > Result with this patch: > root@vm0:~# cat /sys/kernel/debug/zcore/memmap > 0000000000000000 0000000030000000 0000000030000000 0000000010000000 > > The difference is due to memblocks getting merged, resources (currently) > not. So we might have some more entries, but they describe the same > memory map. > > Cc: Heiko Carstens > Cc: Vasily Gorbik > Cc: Christian Borntraeger > Cc: Philipp Rudo > Cc: Kirill Smelkov > Cc: Michael Holzheu > Signed-off-by: David Hildenbrand > --- > drivers/s390/char/zcore.c | 61 ++++++++++++++++++++++++++++++--------- > 1 file changed, 48 insertions(+), 13 deletions(-) I'm having a hard time to find any code that ever made use of this file. After all this was only meant for our zfcp dumper, but as far as I can tell there was never code out there that read the memmap file. So the pragmatic approach would be to just change its contents, or a more progressive variant would be to remove the file completely. But maybe I'm entirely wrong... I'm leaving this up to Philipp and Alexander :)