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=-9.0 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham 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 3C845C43381 for ; Tue, 12 Mar 2019 18:07:58 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id F377A205C9 for ; Tue, 12 Mar 2019 18:07:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1552414078; bh=hkWEe4STWFvEUxLPQEO2Tl2Dw3dNMH92Hu+S+hkw5Os=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=mgYw+k31tA07yn9TKmy3gb4/9UcSVRshk9xd01FktRCJNlGIZ9PBp5MgRbHaPH7Fj EHMA55SLpdeDxwJqD8JMd6VuvP8ggMloicGIqK/voMho1D2Yu3280KU/+kbPDBEVj4 zBAmxvCZpX5zEUtZC+CRiEaVCK42872swzFTQfTA= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727371AbfCLRMR (ORCPT ); Tue, 12 Mar 2019 13:12:17 -0400 Received: from mail.kernel.org ([198.145.29.99]:46324 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727266AbfCLRMD (ORCPT ); Tue, 12 Mar 2019 13:12:03 -0400 Received: from localhost (unknown [104.133.8.98]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 19D44206DF; Tue, 12 Mar 2019 17:12:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1552410723; bh=hkWEe4STWFvEUxLPQEO2Tl2Dw3dNMH92Hu+S+hkw5Os=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=1P4ujX3ynk+G8JJ7mie8paZUWyqaesLQW+mVVT7DSzBwP3K7CROIuczCb4pX/Eh0D afKj/9H89BXsZ17aITZRlPmtz3NDByDoKJ86cFHGiOfzfCrvGCe0c64e1TEJsxZ+9j LtBBtIdeNLtoqwgXt3f7OQGW7IRJ+bwVKTYEeNdg= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Alexandre Ghiti , Christoph Hellwig , Palmer Dabbelt , Sasha Levin Subject: [PATCH 4.20 022/171] riscv: Adjust mmap base address at a third of task size Date: Tue, 12 Mar 2019 10:06:42 -0700 Message-Id: <20190312170349.864996312@linuxfoundation.org> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190312170347.868927101@linuxfoundation.org> References: <20190312170347.868927101@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review X-Patchwork-Hint: ignore MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.20-stable review patch. If anyone has any objections, please let me know. ------------------ [ Upstream commit ae662eec8a515ab550524e04c793b5ddf1aae3a1 ] This ratio is the most used among all other architectures and make icache_hygiene libhugetlbfs test pass: this test mmap lots of hugepages whose addresses, without this patch, reach the end of the process user address space. Signed-off-by: Alexandre Ghiti Reviewed-by: Christoph Hellwig Signed-off-by: Palmer Dabbelt Signed-off-by: Sasha Levin --- arch/riscv/include/asm/processor.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/riscv/include/asm/processor.h b/arch/riscv/include/asm/processor.h index 0531f49af5c3..ce70bceb8872 100644 --- a/arch/riscv/include/asm/processor.h +++ b/arch/riscv/include/asm/processor.h @@ -22,7 +22,7 @@ * This decides where the kernel will search for a free chunk of vm * space during mmap's. */ -#define TASK_UNMAPPED_BASE PAGE_ALIGN(TASK_SIZE >> 1) +#define TASK_UNMAPPED_BASE PAGE_ALIGN(TASK_SIZE / 3) #define STACK_TOP TASK_SIZE #define STACK_TOP_MAX STACK_TOP -- 2.19.1