From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wi0-f170.google.com (mail-wi0-f170.google.com [209.85.212.170]) by kanga.kvack.org (Postfix) with ESMTP id 941556B0132 for ; Mon, 25 May 2015 17:20:51 -0400 (EDT) Received: by wifw1 with SMTP id w1so8880878wif.0 for ; Mon, 25 May 2015 14:20:51 -0700 (PDT) Received: from mout.kundenserver.de (mout.kundenserver.de. [212.227.17.10]) by mx.google.com with ESMTPS id h5si20189910wjz.65.2015.05.25.14.20.49 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 25 May 2015 14:20:50 -0700 (PDT) From: Arnd Bergmann Subject: Re: [RFC PATCH 2/2] arm64: Implement vmalloc based thread_info allocator Date: Mon, 25 May 2015 23:20:45 +0200 Message-ID: <3042945.CWqRdpeSZk@wuerfel> In-Reply-To: References: <1432483340-23157-1-git-send-email-jungseoklee85@gmail.com> <5992243.NYDGjLH37z@wuerfel> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Sender: owner-linux-mm@kvack.org List-ID: To: Jungseok Lee Cc: linux-arm-kernel@lists.infradead.org, Catalin Marinas , barami97@gmail.com, Will Deacon , linux-kernel@vger.kernel.org, linux-mm@kvack.org, Minchan Kim On Monday 25 May 2015 19:01:33 Jungseok Lee wrote: > On May 25, 2015, at 2:49 AM, Arnd Bergmann wrote: > > Could the stack size be reduced to 8KB perhaps? > > I guess probably not. > > A commit, 845ad05e, says that 8KB is not enough to cover SpecWeb benchmark. > The stack size is 16KB on x86_64. I am not sure whether all applications, > which work fine on x86_64 machine, run very well on ARM64 with 8KB stack size. A more interesting explanation is probably the one that led to x86 adopting 16kb pages, see https://lwn.net/Articles/600644 , https://lwn.net/Articles/600649/ and http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=6538b8ea88 Based on that, I have to agree that lowering the size back to 8kb seems unrealistic at the moment, but at the same time, we need to actively keep working on reducing the stack size. IRQ stacks are one important point here, but in the trace that Minchan Kim has in the commit for x86-64 there is not even an interrupt. I've looked at the code that is generated by aarch64-linux-gcc-4.8 now and found that it does not try very hard to reduce the stack size, the first function I fed it end up up using 48 bytes of stack where half of that would suffice, so there is probably room for optimization within the boundaries of the ABI, possibly more if we allow kernel specific calling conventions as some other architectures have implemented in the past. Arnd -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: email@kvack.org