linux-mips
[Top] [All Lists]

Re: [PATCH V2 4/8] MIPS: Add NUMA support for Loongson-3

To: Ralf Baechle <ralf@linux-mips.org>
Subject: Re: [PATCH V2 4/8] MIPS: Add NUMA support for Loongson-3
From: David Daney <ddaney.cavm@gmail.com>
Date: Wed, 04 Jun 2014 10:22:17 -0700
Cc: Huacai Chen <chenhc@lemote.com>, John Crispin <john@phrozen.org>, "Steven J. Hill" <Steven.Hill@imgtec.com>, Aurelien Jarno <aurelien@aurel32.net>, linux-mips@linux-mips.org, Fuxin Zhang <zhangfx@lemote.com>, Zhangjin Wu <wuzhangjin@gmail.com>
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type:content-transfer-encoding; bh=gwIy/zP3LhbH+XHkPBggKDnb03hCsLlAPZ1gR+Xmqgk=; b=GwDog7aLmGxCvMHgPuivnxFAhqWFhTpdmiXZYh+tm/BKorgnGnQgke1spVbvkUKbM4 VfBqWrXULByaHpOJBg6oJTip3nCoX3aLTCDzvfcag6rA3WoHNV42GxmzmPQJ6DXyfRnW Ngwp8kP5Q6XesqLTeIIfMp7C8bcqGWFzPwVWwBGyIi8GdW+Qz2tHf0uR/ZkKMjxnVA3G SLf9tYxvIBVkEMolwaHv1T8Sf2JWnu3CQ+N9CWOr9rOgNfSg+VbTgi50J3AQG6AIo+aJ XCSYjez/+kJaIEj5N1K1WYs6LSIQopjw/hOHzx24kIxZES+QpUuQQ+GygWVo1JCI3csb DCGQ==
In-reply-to: <20140604064601.GU5157@linux-mips.org>
List-archive: <http://www.linux-mips.org/archives/linux-mips/>
List-help: <mailto:ecartis@linux-mips.org?Subject=help>
List-id: linux-mips <linux-mips.eddie.linux-mips.org>
List-owner: <mailto:ralf@linux-mips.org>
List-post: <mailto:linux-mips@linux-mips.org>
List-software: Ecartis version 1.0.0
List-subscribe: <mailto:ecartis@linux-mips.org?subject=subscribe%20linux-mips>
List-unsubscribe: <mailto:ecartis@linux-mips.org?subject=unsubscribe%20linux-mips>
Original-recipient: rfc822;linux-mips@linux-mips.org
References: <1397348662-22502-1-git-send-email-chenhc@lemote.com> <1397348662-22502-5-git-send-email-chenhc@lemote.com> <20140603224739.GU17197@linux-mips.org> <538E5EA8.8010907@gmail.com> <20140604064601.GU5157@linux-mips.org>
Sender: linux-mips-bounce@linux-mips.org
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130625 Thunderbird/17.0.7
On 06/03/2014 11:46 PM, Ralf Baechle wrote:

A more important value which I haven't noticed the Looongson patches to
modify is SECTION_SIZE_BITS in <asm/sparsemem.h>:

#if defined(CONFIG_MIPS_HUGE_TLB_SUPPORT) && defined(CONFIG_PAGE_SIZE_64KB)
# define SECTION_SIZE_BITS      29
#else
# define SECTION_SIZE_BITS      28
#endif

Don't ask me why its definition depends on MIPS_HUGE_TLB_SUPPORT and
PAGE_SIZE_64KB - the value describes the larges chunk of contiguous
memory (that is for example memory per node) and that doesn't depend
on these CONFIG_* symbols.


I think I can answer that.  We do the same thing for OCTEON I think.

IIRC, with SPARSEMEM, you cannot allocate high order pages that span multiple sections. Therefore you have to have the sections be at least as large as a huge page. in the case of CONFIG_PAGE_SIZE_64KB, the huge pages are 512MB which doesn't fit in 28 bits.

David.


   Ralf




<Prev in Thread] Current Thread [Next in Thread>