Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751452AbbEXRtL (ORCPT ); Sun, 24 May 2015 13:49:11 -0400 Received: from mout.kundenserver.de ([212.227.17.10]:60295 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751218AbbEXRtJ (ORCPT ); Sun, 24 May 2015 13:49:09 -0400 From: Arnd Bergmann To: linux-arm-kernel@lists.infradead.org Cc: Jungseok Lee , Catalin Marinas , barami97@gmail.com, Will Deacon , linux-kernel@vger.kernel.org, linux-mm@kvack.org Subject: Re: [RFC PATCH 2/2] arm64: Implement vmalloc based thread_info allocator Date: Sun, 24 May 2015 19:49:01 +0200 Message-ID: <5992243.NYDGjLH37z@wuerfel> User-Agent: KMail/4.11.5 (Linux/3.16.0-10-generic; KDE/4.11.5; x86_64; ; ) In-Reply-To: <1432483340-23157-1-git-send-email-jungseoklee85@gmail.com> References: <1432483340-23157-1-git-send-email-jungseoklee85@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Provags-ID: V03:K0:SC2a95pj0JMlAFNRr+C3qgWnwv+xTwGbWtr8C7WW1kWGUdJjmjL dtSogxwNTKqnA4aq/xcGtW2jB+N8iQuzqKbMWG45jghsI0fxu8+MzD7L4Pb9JAdzN3HsndK PM1XFN/tQ71ctV3iLuKHvv+5PDD6yjQ840ynA0E7SLAUgU+6QGOG6rpYk6oX9i3eFgN+brH XLpY4XI+uoWB2Cgu2boQw== X-UI-Out-Filterresults: notjunk:1; Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1168 Lines: 25 On Monday 25 May 2015 01:02:20 Jungseok Lee wrote: > Fork-routine sometimes fails to get a physically contiguous region for > thread_info on 4KB page system although free memory is enough. That is, > a physically contiguous region, which is currently 16KB, is not available > since system memory is fragmented. > > This patch tries to solve the problem as allocating thread_info memory > from vmalloc space, not 1:1 mapping one. The downside is one additional > page allocation in case of vmalloc. However, vmalloc space is large enough, > around 240GB, under a combination of 39-bit VA and 4KB page. Thus, it is > not a big tradeoff for fork-routine service. vmalloc has a rather large runtime cost. I'd argue that failing to allocate thread_info structures means something has gone very wrong. Can you describe the scenario that leads to fragmentation this bad? Could the stack size be reduced to 8KB perhaps? Arnd -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/