From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.2 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5115FC47093 for ; Tue, 1 Jun 2021 09:02:24 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 34A0B61364 for ; Tue, 1 Jun 2021 09:02:24 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233603AbhFAJED (ORCPT ); Tue, 1 Jun 2021 05:04:03 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:55222 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233542AbhFAJEB (ORCPT ); Tue, 1 Jun 2021 05:04:01 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1622538140; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=lTj0e2ix7Em5ReRBGmBE8UcFjJXaGmDtfxA9DwPKs3Y=; b=hl5WtER7JX53dBcKImZjoE4E6KN9LoXwoMyigbxWhzWkOWPZpdeAiu+PmU/q0+IunsoGhN Yo66ulpzstSzLhhTrtXenzpOU7dgAvXVUxsEbekOoe20CEKuba75uU6PStmzEGMitZe29N Alxkuqq1//928qwfQ4rZUCgxtdhPy1Y= Received: from mail-wr1-f70.google.com (mail-wr1-f70.google.com [209.85.221.70]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-32-8EqqgNVSMiGVcZfATiL7mg-1; Tue, 01 Jun 2021 05:02:19 -0400 X-MC-Unique: 8EqqgNVSMiGVcZfATiL7mg-1 Received: by mail-wr1-f70.google.com with SMTP id x10-20020adfc18a0000b029010d83c83f2aso4603675wre.8 for ; Tue, 01 Jun 2021 02:02:19 -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:references:organization:subject :message-id:date:user-agent:mime-version:in-reply-to :content-language:content-transfer-encoding; bh=lTj0e2ix7Em5ReRBGmBE8UcFjJXaGmDtfxA9DwPKs3Y=; b=OBIVHroF48aDChNOf5eGYTAPq0lIrq3/PYluVTv83bLdjOEUTsvE6I4O9UHDQcJBXY 6IWkxZqX1TzLOB3U+AZ7e1isiJiM8LkwWgPQDlNMByRdaJrgMeL8kTnbu48jeABD2Rvl u+bGh6S0Nk5L8p0bZ7qy0jvuE4Iab/n+dqUJePxsrDnszL9C8GNkp6IAXqJ2GXBz0RJM t5rahCooty9cQwVNrok7v3JwbjYNTXK7g9jF80EATqhaUgfcSWU1KQEZP6zaO+5zxsXK fZYrLEzmxtdvyP8SQN5I28PThaBUYsc1sivaFO4x54yt3X9vHhHWQv+py9+0Y7JBSEJj wGNQ== X-Gm-Message-State: AOAM530rS6EzW0xxjE48XkLOzQ50o/qKKnVrOhWJRhmfBM3mcJYfPisN fGrbqqE5J6CzF5peElmG5srM7WC8RFrzQZBKHBj9uD3P8NTN/f8Cs17soLQqy47CBc1zRXR1y6a bMFK1KoIwVfwNjHggtXDFFLa3 X-Received: by 2002:a05:600c:47c4:: with SMTP id l4mr3421514wmo.145.1622538138338; Tue, 01 Jun 2021 02:02:18 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzye8Yw+0bLOb0SBvbHwXC4HYmyiMFfH3IyzfuxKInF6JuzngzXM+aezXKoW/iZU7+Z69Ow5A== X-Received: by 2002:a05:600c:47c4:: with SMTP id l4mr3421493wmo.145.1622538138179; Tue, 01 Jun 2021 02:02:18 -0700 (PDT) Received: from [192.168.3.132] (p5b0c69ce.dip0.t-ipconnect.de. [91.12.105.206]) by smtp.gmail.com with ESMTPSA id 11sm17960058wmo.24.2021.06.01.02.02.17 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 01 Jun 2021 02:02:17 -0700 (PDT) From: David Hildenbrand To: Mike Rapoport , linux-kernel@vger.kernel.org Cc: Andrew Morton , Catalin Marinas , Christian Borntraeger , Heiko Carstens , Mike Rapoport , Russell King , Thomas Bogendoerfer , Vasily Gorbik , Will Deacon , linux-arm-kernel@lists.infradead.org, linux-mips@vger.kernel.org, linux-mm@kvack.org, linux-s390@vger.kernel.org References: <20210531122959.23499-1-rppt@kernel.org> <20210531122959.23499-2-rppt@kernel.org> <1efc386c-2cb4-164f-7194-497f142f969f@redhat.com> Organization: Red Hat Subject: Re: [RFC/RFT PATCH 1/5] s390: make crashk_res resource a child of "System RAM" Message-ID: Date: Tue, 1 Jun 2021 11:02:17 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.10.1 MIME-Version: 1.0 In-Reply-To: <1efc386c-2cb4-164f-7194-497f142f969f@redhat.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 01.06.21 10:45, David Hildenbrand wrote: > On 31.05.21 14:29, Mike Rapoport wrote: >> From: Mike Rapoport >> >> Commit 4e042af463f8 ("s390/kexec: fix crash on resize of reserved memory") >> added a comment that says "crash kernel resource should not be part of the >> System RAM resource" but never explained why. As it looks from the code in >> the kernel and in kexec there is no actual reason for that. > > Are you sure? > > Looking at kexec-tools: kexec/arch/s390/kexec-s390.c > > get_memory_ranges_s390() wants "System RAM" and Crash kernel only with > "with_crashk=1". Your patch would change that. "Crash kernel" would > always be included if you make it a child of "System RAM". > > Further, get_memory_ranges() and is_crashkernel_mem_reserved() look out > for "Crash kernel\n" via parse_iomem_single(). > > However, parse_iomem_single() does not care about ranges that start with > spaces IIRC via > sscanf(line, "%llx-%llx : %n" ... I think I'm wrong about that one because I read "Input white-space characters (as specified by the isspace function) are skipped, unless the specification includes a [ , c , or n specifier" So having it as a child won't affect parse_iomem_single(). -- Thanks, David / dhildenb From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.2 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 4252CC4708F for ; Tue, 1 Jun 2021 09:06:42 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 0D5C9610C9 for ; Tue, 1 Jun 2021 09:06:42 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 0D5C9610C9 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:Content-Type: Content-Transfer-Encoding:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:Date:Message-ID:Subject: References:Cc:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=XyawHMEPgGRSueCWz42gzL8kNYPeBQ5V0IaFAJGHUJk=; b=rx4XBN4A8BUEuOGM4VUJ2nYpm9 alj/jkfBn+4tAD2MAp9SUKA+Rcl43Ce63n8Yy0Spyo3FqW3cbDtCc7cHeSH1hpmgzJaDkoONRwPYB Ez1stxliY7NoVY3jGk0ffXx8+OYn2CPgsbd0rDxvhwQdmuogtW0hPQuA1WOCdYzNRhVjT0TjzTXnY 71m591KTK/p7OK9R7XN4C8T9rCPl1khpxbAhBVKM9O9KGEg9rW3gf2seCvpiOhbkx0oTdrVIU3yEZ vtI7+QEwSYSrytnLeAjmNuxYmSn/eShfzRR1qKrFIl03ZtHrlem60908LhG69wBmB4bxmBL3WhK/Y /Ob2v6UA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1lo0KQ-00FVQB-3b; Tue, 01 Jun 2021 09:04:51 +0000 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1lo0I2-00FU9Y-EK for linux-arm-kernel@lists.infradead.org; Tue, 01 Jun 2021 09:02:24 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1622538140; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=lTj0e2ix7Em5ReRBGmBE8UcFjJXaGmDtfxA9DwPKs3Y=; b=hl5WtER7JX53dBcKImZjoE4E6KN9LoXwoMyigbxWhzWkOWPZpdeAiu+PmU/q0+IunsoGhN Yo66ulpzstSzLhhTrtXenzpOU7dgAvXVUxsEbekOoe20CEKuba75uU6PStmzEGMitZe29N Alxkuqq1//928qwfQ4rZUCgxtdhPy1Y= Received: from mail-wr1-f72.google.com (mail-wr1-f72.google.com [209.85.221.72]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-518-KzNllTIwMd6y5JWGSvy5cQ-1; Tue, 01 Jun 2021 05:02:19 -0400 X-MC-Unique: KzNllTIwMd6y5JWGSvy5cQ-1 Received: by mail-wr1-f72.google.com with SMTP id n2-20020adfb7420000b029010e47b59f31so4564839wre.9 for ; Tue, 01 Jun 2021 02:02:19 -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:references:organization:subject :message-id:date:user-agent:mime-version:in-reply-to :content-language:content-transfer-encoding; bh=lTj0e2ix7Em5ReRBGmBE8UcFjJXaGmDtfxA9DwPKs3Y=; b=Tjj3L+KbAcq5ju6QoatJjpg+KXdCVxRCingzq5Eefz4oxEP7Z6i3DO+imcUHfrqSBc GC9s9VRTqWJPo+WVK3oc4zSinjJ2Ku2vJgNVRINgG6ALCIy8bYrz2UiF6T6YUVNa666r GKmwZDQJCo268xkhUCyfZe3BxGK4i6NWQMU4EoIQC73oEH1Bht+UJCQYLfa6j07evY03 uV4U4yeunXapnwmUYp6EYmK8byO++23snmMOAgJx9Gj4O13bNrIbk810PkvT52tr7pXq IEi+Mxl63TeR5szeCJzEFltNk8jd5scalwt6FDpNc5xr7fpUnHSE5IC8mpDl2QzZ0Bmc UB3g== X-Gm-Message-State: AOAM530stidkDcIR0rbyY+nWRHaw/NkweOts0CTFXrHUrEsjYD136gQE d/SLtTSyNi1My5wZZciRn7B1vHzCMSLY56wFvZMkRQaulLf3H1cxQ3qmZFxC+EskCohpbJlIVIN o3E5jqZrLqKgpv5RS6K6il2zSPB9CpTujkS0= X-Received: by 2002:a05:600c:47c4:: with SMTP id l4mr3421516wmo.145.1622538138337; Tue, 01 Jun 2021 02:02:18 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzye8Yw+0bLOb0SBvbHwXC4HYmyiMFfH3IyzfuxKInF6JuzngzXM+aezXKoW/iZU7+Z69Ow5A== X-Received: by 2002:a05:600c:47c4:: with SMTP id l4mr3421493wmo.145.1622538138179; Tue, 01 Jun 2021 02:02:18 -0700 (PDT) Received: from [192.168.3.132] (p5b0c69ce.dip0.t-ipconnect.de. [91.12.105.206]) by smtp.gmail.com with ESMTPSA id 11sm17960058wmo.24.2021.06.01.02.02.17 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 01 Jun 2021 02:02:17 -0700 (PDT) From: David Hildenbrand To: Mike Rapoport , linux-kernel@vger.kernel.org Cc: Andrew Morton , Catalin Marinas , Christian Borntraeger , Heiko Carstens , Mike Rapoport , Russell King , Thomas Bogendoerfer , Vasily Gorbik , Will Deacon , linux-arm-kernel@lists.infradead.org, linux-mips@vger.kernel.org, linux-mm@kvack.org, linux-s390@vger.kernel.org References: <20210531122959.23499-1-rppt@kernel.org> <20210531122959.23499-2-rppt@kernel.org> <1efc386c-2cb4-164f-7194-497f142f969f@redhat.com> Organization: Red Hat Subject: Re: [RFC/RFT PATCH 1/5] s390: make crashk_res resource a child of "System RAM" Message-ID: Date: Tue, 1 Jun 2021 11:02:17 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.10.1 MIME-Version: 1.0 In-Reply-To: <1efc386c-2cb4-164f-7194-497f142f969f@redhat.com> Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=david@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Language: en-US X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210601_020222_576023_646E387A X-CRM114-Status: GOOD ( 17.71 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On 01.06.21 10:45, David Hildenbrand wrote: > On 31.05.21 14:29, Mike Rapoport wrote: >> From: Mike Rapoport >> >> Commit 4e042af463f8 ("s390/kexec: fix crash on resize of reserved memory") >> added a comment that says "crash kernel resource should not be part of the >> System RAM resource" but never explained why. As it looks from the code in >> the kernel and in kexec there is no actual reason for that. > > Are you sure? > > Looking at kexec-tools: kexec/arch/s390/kexec-s390.c > > get_memory_ranges_s390() wants "System RAM" and Crash kernel only with > "with_crashk=1". Your patch would change that. "Crash kernel" would > always be included if you make it a child of "System RAM". > > Further, get_memory_ranges() and is_crashkernel_mem_reserved() look out > for "Crash kernel\n" via parse_iomem_single(). > > However, parse_iomem_single() does not care about ranges that start with > spaces IIRC via > sscanf(line, "%llx-%llx : %n" ... I think I'm wrong about that one because I read "Input white-space characters (as specified by the isspace function) are skipped, unless the specification includes a [ , c , or n specifier" So having it as a child won't affect parse_iomem_single(). -- Thanks, David / dhildenb _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel