Received: by 2002:a25:e74b:0:0:0:0:0 with SMTP id e72csp372282ybh; Wed, 22 Jul 2020 02:50:40 -0700 (PDT) X-Google-Smtp-Source: ABdhPJymx2FsK+u2gz28jQ7iZ+e359gRhKSt74Nl+oYojPfTyxworurOzPGjN3DyjL8ytKfnRIH5 X-Received: by 2002:a17:906:29d8:: with SMTP id y24mr28880909eje.212.1595411439920; Wed, 22 Jul 2020 02:50:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1595411439; cv=none; d=google.com; s=arc-20160816; b=W/eeXe3DdvP2KJpnAFK47TW3J+0qV5FtFcodBHjn7en6RidrE1sJrdS+a4R7R16G8t yFhx0Tvd1knhOBSLPn8mu9hGqzPM1CabiNNGCSF49/ENMfVaixkn3imKTY9TsLjr1Rmb DHcIiToYmqy/gpIDpi/l3Cf8Z7VmZc0XQFethAJ6scq1wZvsCL3zrxPWHH7iSQCkjfR6 zEZbEQMzOv5R1/fesf4IlyfxragacxaUFQBADvHGOVoC0r9D7T2ApVZi2EW4/v+4jwDJ fEy+zu+xaE60TAe7mqKNOMqLj+/KvM+ud24aGuEMQefFfsb9PsBARvH7syv0+51J5kDR TvEQ== 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:message-id:date:subject:cc:to:from :dkim-signature; bh=T0K2FcSq6leMfuluLpIVelm2NQA8cm14HeDeSCdv624=; b=c8ECRCony9MF9zP6fT6cWlqIo0pzBVc+GD5bT5U8tD7cXPSrOhDrxnHh0DwXz+AUdJ 1yXGbuqj+qnzdw64uQur8oO0B98MYzDrEDhUSoCKTA30Q6cWrP8b94SUtGko8bSOMb2v qYag+iYU9JycA6RbtwVtVyEb8nxRm7vf6png369JbqDUb3m1HkoEIkD6aYY0m+0ui0uJ dr6LvvOJDXyrBUBS3etonkFHD8GuCNL0A5AJz23JA4/MMq7GdY549c0RPvcSXf5Nw5vO LE8o6csGDuEDzFjzGmrd0CXp2TKkcfomEn3gCovtAs0O+BjeSsNDNXmCmcb/dlfOBfys 3zgQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=YmAfrco+; 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=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id g26si13880672edq.238.2020.07.22.02.50.16; Wed, 22 Jul 2020 02:50:39 -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; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=YmAfrco+; 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=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731927AbgGVJqn (ORCPT + 99 others); Wed, 22 Jul 2020 05:46:43 -0400 Received: from us-smtp-delivery-1.mimecast.com ([205.139.110.120]:58809 "EHLO us-smtp-1.mimecast.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1731370AbgGVJq3 (ORCPT ); Wed, 22 Jul 2020 05:46:29 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1595411188; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=T0K2FcSq6leMfuluLpIVelm2NQA8cm14HeDeSCdv624=; b=YmAfrco+oYDXfQrMB7kiaLF0ZEvMHOvkpk8qzxJSREpwAtio6iR/62RY/U2yHkAJDYxPxf 9uV69Safekacmd3oMcOKTcCuLLDGJ2YCmlpFJ9RByd97LYzwIzcv4Zv4O2USr6x3/SGI71 +qlg4ot0Gbm2hX24/WaUiXFVOvvfhZs= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-86-YgASFoKtPVSRf2tB1VsMrA-1; Wed, 22 Jul 2020 05:46:24 -0400 X-MC-Unique: YgASFoKtPVSRf2tB1VsMrA-1 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 2774F800688; Wed, 22 Jul 2020 09:46:23 +0000 (UTC) Received: from t480s.redhat.com (ovpn-113-254.ams2.redhat.com [10.36.113.254]) by smtp.corp.redhat.com (Postfix) with ESMTP id B1BC45D9CA; Wed, 22 Jul 2020 09:46:18 +0000 (UTC) From: David Hildenbrand To: linux-kernel@vger.kernel.org Cc: linux-s390@vger.kernel.org, linux-mm@kvack.org, David Hildenbrand , Heiko Carstens , Vasily Gorbik , Christian Borntraeger , Gerald Schaefer Subject: [PATCH v2 7/9] s390/vmemmap: fallback to PTEs if mapping large PMD fails Date: Wed, 22 Jul 2020 11:45:56 +0200 Message-Id: <20200722094558.9828-8-david@redhat.com> In-Reply-To: <20200722094558.9828-1-david@redhat.com> References: <20200722094558.9828-1-david@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Let's fallback to single pages if short on huge pages. No need to stop memory hotplug. Cc: Heiko Carstens Cc: Vasily Gorbik Cc: Christian Borntraeger Cc: Gerald Schaefer Signed-off-by: David Hildenbrand --- arch/s390/mm/vmem.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/arch/s390/mm/vmem.c b/arch/s390/mm/vmem.c index b831f9f9130aa..e82a63de19db2 100644 --- a/arch/s390/mm/vmem.c +++ b/arch/s390/mm/vmem.c @@ -180,10 +180,10 @@ static int __ref modify_pmd_table(pud_t *pud, unsigned long addr, */ new_page = vmemmap_alloc_block(PMD_SIZE, NUMA_NO_NODE); - if (!new_page) - goto out; - pmd_val(*pmd) = __pa(new_page) | prot; - continue; + if (new_page) { + pmd_val(*pmd) = __pa(new_page) | prot; + continue; + } } pte = vmem_pte_alloc(); if (!pte) -- 2.26.2