Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp1795710ybi; Wed, 3 Jul 2019 23:34:43 -0700 (PDT) X-Google-Smtp-Source: APXvYqwlup/n6bC0mF4vlLN06WVuduYJ3pCREzsyBtB9I5FEavsddcbxp5DwwUTbLDfSC78er65p X-Received: by 2002:a17:902:2ec5:: with SMTP id r63mr46923157plb.21.1562222082855; Wed, 03 Jul 2019 23:34:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1562222082; cv=none; d=google.com; s=arc-20160816; b=M6LR8bxAhkNrwwuFJHBhsmYpHnGXylgnx4yQ3q3uG/UzO73FMe1Er11CjDr4D5PVz7 p+qyTxaPxCAAQkOEYQftjHXDManPH8HWh6U3y75ip2ll+X+N0r9XhkRgglGOBCt6Jtpu O4Z1xJy0Kbgh2iUBq0PxEu6+qaQJXaTpMQCt/lLuhystS/NnLJ/TAt639IS289u3MKGT ZAz+tTtTvKbUk8IqKkWgCWh2ArQrA2YdYvIKBWAd1b1hQIed3W1Fmh7yx7GjvmOTFxcR 1dJyE66QN8cPp9FY2wfe0qx21dnfQ7uDCylQZegxCKfOKbHZaLemkh3cgmIzSQVP4VVI aclA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-language :content-transfer-encoding:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject; bh=iot2DKqbi81Bn0WLXcQv6QaLK+8N6oXnR31gh6/lhNU=; b=vBAFPAkCDoybyduFSk5huDnSOuQdUdWDWBha+i2MpVb9gq9k8KgKkg+aVerweOAodT +b1Q42LTSqMZnpWUvSz4kkWFZxS1CtcsNt0bgsajjqpA+jYNSH/OhTUT18hI3HKwBMCb DSMm0Nc00ybEbp3onS7Y4nRR0vaIlfiQrrk1fOX7Tiv1KhdL7uD2Y6W1BmLt9wrIQQ6M S1YZK2wuGAJMmlDHbYBNKf1Z6VRD7+IQjeA5l7yrBSO+3kxbQqzrZojXRrgymrf54sfS Adgtk63yru06OsuHzdy4UsDrlG1/39AVIDpawRU/kv3ooZvqrcAxlt2aiLyQbjIrrlS3 GUUQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id k33si3122928pgi.563.2019.07.03.23.34.26; Wed, 03 Jul 2019 23:34:42 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727063AbfGDGd7 (ORCPT + 99 others); Thu, 4 Jul 2019 02:33:59 -0400 Received: from relay3-d.mail.gandi.net ([217.70.183.195]:43227 "EHLO relay3-d.mail.gandi.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725861AbfGDGd7 (ORCPT ); Thu, 4 Jul 2019 02:33:59 -0400 X-Originating-IP: 81.250.144.103 Received: from [10.30.1.20] (lneuilly-657-1-5-103.w81-250.abo.wanadoo.fr [81.250.144.103]) (Authenticated sender: alex@ghiti.fr) by relay3-d.mail.gandi.net (Postfix) with ESMTPSA id 0B08460004; Thu, 4 Jul 2019 06:33:44 +0000 (UTC) Subject: Re: [PATCH v3 0/2] Hugetlbfs support for riscv To: Paul Walmsley Cc: Albert Ou , "H . Peter Anvin" , Catalin Marinas , Palmer Dabbelt , Will Deacon , x86@kernel.org, linux-kernel@vger.kernel.org, Christoph Hellwig , Ingo Molnar , Borislav Petkov , Hanjun Guo , Thomas Gleixner , linux-riscv@lists.infradead.org, linux-arm-kernel@lists.infradead.org, Mike Kravetz References: <20190701175900.4034-1-alex@ghiti.fr> From: Alexandre Ghiti Message-ID: Date: Thu, 4 Jul 2019 08:33:44 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.6.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-Language: fr Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 7/4/19 12:57 AM, Paul Walmsley wrote: > Hi Alex, > > Thanks for writing and testing these patches, and thanks for your patience > waiting for reviews and testing. No problem :) > On Mon, 1 Jul 2019, Alexandre Ghiti wrote: > >> This series introduces hugetlbfs support for both riscv 32/64. Riscv32 >> is architecturally limited to huge pages of size 4MB whereas riscv64 has >> 2MB/1G huge pages support. Transparent huge page support is not >> implemented here, I will submit another series later. >> > [ ... ] > >> This series was validated using libhugetlbfs testsuite ported to riscv64 >> without linker script support. >> (https://github.com/AlexGhiti/libhugetlbfs.git, branch dev/alex/riscv). >> >> - libhugetlbfs testsuite on riscv64/2M: >> - brk_near_huge triggers an assert in malloc.c, does not on x86. > I was able to reproduce the 2MB megapages test results on rv64 QEMU. On a > HiFive Unleashed, though, a few more tests fail: > > - icache_hygiene fails ("icache unclean") > > # LD_LIBRARY_PATH=obj64 ./tests/obj64/icache-hygiene > Starting testcase "./tests/obj64/icache-hygiene", pid 732 > SIGILL at 0x15559fff80 (sig_expected=0x15559fff80) > SIGILL at 0x1555dfff80 (sig_expected=0x1555dfff80) > SIGILL at 0x15561fff80 (sig_expected=0x15561fff80) > SIGILL at 0x15565fff80 (sig_expected=0x15565fff80) > SIGILL at 0x15569fff80 (sig_expected=0x15569fff80) > SIGILL at 0x1556dfff80 (sig_expected=(nil)) > FAIL SIGILL somewhere unexpected > # > > - One of the heapshrink tests fails ("Heap did not shrink") > > # LD_PRELOAD="obj64/libhugetlbfs_privutils.so obj64/libhugetlbfs.so tests/obj64/libheapshrink.so" HUGETLB_MORECORE_SHRINK=yes HUGETLB_MORECORE=yes tests/obj64/heapshrink > Starting testcase "tests/obj64/heapshrink", pid 753 > FAIL Heap did not shrink > # > > Some of these may be related to the top-down mmap work, but there might be > more work to do on actual hardware. I don't think this is related to top-down mmap layout, this test only mmaps a huge page. It might be interesting to see more verbose messages adding HUGETLB_VERBOSE=99 when launching the test. > >> - libhugetlbfs testsuite on riscv64/1G: >> - brk_near_huge triggers an assert in malloc.c, does not on x86. >> - mmap-gettest, mmap-cow: testsuite passes the number of default free >> pages as parameters and then fails for 1G which is not the default. >> Otherwise succeeds when given the right number of pages. >> - map_high_truncate_2 fails on x86 too: 0x60000000 is not 1G aligned >> and fails at line 694 of fs/hugetlbfs/inode.c. >> - heapshrink on 1G fails on x86 too, not investigated. >> - counters.sh on 1G fails on x86 too: alloc_surplus_huge_page returns >> NULL in case of gigantic pages. >> - icache-hygiene succeeds after patch #3 of this series which lowers >> the base address of mmap. >> - fallocate_stress.sh on 1G never ends, on x86 too, not investigated. > I can reproduce some of these here on QEMU. But for reasons that are > unclear to me, 1G gigapages aren't working on the HiFive Unleashed here. > > In any case, these patches are clearly a good start, so I've queued > them for v5.3. > > > - Paul > > _______________________________________________ > linux-riscv mailing list > linux-riscv@lists.infradead.org > http://lists.infradead.org/mailman/listinfo/linux-riscv