Received: by 10.223.185.116 with SMTP id b49csp74682wrg; Tue, 13 Feb 2018 16:54:10 -0800 (PST) X-Google-Smtp-Source: AH8x225WcGXiilgBaKxozmS6qrBIC9jM9W//tFW/zUFx/ojA61whjZ+exZQPYnq28ZR2ReoMZfyi X-Received: by 10.99.36.70 with SMTP id k67mr1500153pgk.48.1518569650228; Tue, 13 Feb 2018 16:54:10 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1518569650; cv=none; d=google.com; s=arc-20160816; b=EpKvrukaJgdncCDCXpwPIL7RewKfrnCtn7ssXMaKFYuySdtCcku9NTlBFAC5l1pfbm qEXBS+tueupzMhA73lLG1tDRFYz+rvD8K5aJiJKpSZgG1g/q2Da78DXd+GcABYmxtLyg AtWujSc3Rpngpbq0ozPg2u+mVnfVbcxyiM4cQry+sAzjKSWWXrPzoLLHj8Op6S9vr+9+ VbitHX+mOu/a7WIsfWj1xJvXLrtiCqphhAFvn9HRRPkzD0ZaVgEzn1eMs0pY10jwA8c6 rGXjn/xn6o+y+Y77116QmsOPqjWZBtUddij/sT4WhDHBPYRD83b24jPLPCxagr3eT4LF tDdA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :message-id:in-reply-to:subject:cc:to:from:date:dkim-signature :arc-authentication-results; bh=Wr/40yyIhWBvr8kd4YsnQ8b/GT05HTaM+M6EtjsicTo=; b=yvnuZcx77PmloNVlPZuF3t/TfEnWfMziPmRhmb77DEEv+tkZ5CuU+AozDLhA9WJ+YD IImMzMPurrer+WarMDeytL8tH0GcYmDLehkLpvJ2Sb353Lywb/SqAt6FiOAxpquzMgoR FGSPXSgIXUtp64N+zH/i4TIUbKmgk6mqWQcNqNiYqpE63fOnAcBYjc79qtRKkZvMEZ+d EmlRetCGyfnacKGTChGHzuUB6gjVTQuMeO2t90BcBT2L1DnE2K9qTEnVmbfZrA25QUIe UvB2FSW/X5wFIGHnItVWZJ1frITQH/bU/pyEUnlKUo/f/8V3PxZKvS1wRuzXq0v+V/rj Gk+g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=O04hVhze; 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; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id e7-v6si2090910plk.133.2018.02.13.16.53.55; Tue, 13 Feb 2018 16:54:10 -0800 (PST) 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; dkim=pass header.i=@google.com header.s=20161025 header.b=O04hVhze; 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; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S966336AbeBNAxR (ORCPT + 99 others); Tue, 13 Feb 2018 19:53:17 -0500 Received: from mail-io0-f195.google.com ([209.85.223.195]:46731 "EHLO mail-io0-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S966220AbeBNAxP (ORCPT ); Tue, 13 Feb 2018 19:53:15 -0500 Received: by mail-io0-f195.google.com with SMTP id k80so11970397ioe.13 for ; Tue, 13 Feb 2018 16:53:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=date:from:to:cc:subject:in-reply-to:message-id:references :user-agent:mime-version; bh=Wr/40yyIhWBvr8kd4YsnQ8b/GT05HTaM+M6EtjsicTo=; b=O04hVhzeekLg0wCN2OkJtS0F4mpAw/7aQ80if521GFGIPPsLsME5eZZLARjx/dY9MS zkUvnVC1ozOxPAZTK7ekZ5ZVAXKLfjsQqJ+x852p/BVX0kvmXUdKEJAXLq9DXJ7BecfK kJrJvo82gG9234Uipiv9/Se1mU/zVs6ttdwb1YDfSVlLa73x2fFdNpWDQIEn6bmHWnnr MBdt30cbViB77GBjuuQBkn3G4K86akOHAai7b7pxirIStfRnGpsA1nQARPbjwWFGWKRl qdzJplwTWJLNKfv/IwEfUP+T8mPqoVFXEZ4VrUikSm0Xb0YYbOBTZgSlaJyktFFb+VXo d5JA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:in-reply-to:message-id :references:user-agent:mime-version; bh=Wr/40yyIhWBvr8kd4YsnQ8b/GT05HTaM+M6EtjsicTo=; b=eOSRdBKW4OkB42k01mqhQlQ0xUL/ItTDhyrojBvqgpNYa8BgwAdfvpoMqS97dXpaZX nVLuAHXxgB8CbOEQBPsqhTrqi9OS+FJ7wPkxRukRh2tl5aZ6L6NLjDQAG0FF6UnBTUDX ILJIN/mDfuk8eCgb5SjfZCzhDCTm6iNWEGE/Ijl2YWmmEsMVXL6sekcB3JV6diOJG6iH DYA5sZeDeQJZ6FF/VzMVoHhYRox5BCoDvSZFIOuwd9H030NWQCrD+fYH8UDiy+bVKW2i ShFeRk5wHYPol5pzWil219mGFftTA37Bj6QoO24WVAyEM0x78vC1JputAUGESAxHE0S0 O8DQ== X-Gm-Message-State: APf1xPA3ISRVkKSNE/xxyeOAwSSAW2ME99RNn56l2Vzu4K5SiT6e3MkM vBrgfzR1OlFXt+p/dkCWaRRP0Q== X-Received: by 10.107.181.201 with SMTP id e192mr3386444iof.89.1518569594390; Tue, 13 Feb 2018 16:53:14 -0800 (PST) Received: from [2620:15c:17:3:dc0:1ee9:9ea3:7c4f] ([2620:15c:17:3:dc0:1ee9:9ea3:7c4f]) by smtp.gmail.com with ESMTPSA id l82sm15449773ioe.20.2018.02.13.16.53.13 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 13 Feb 2018 16:53:13 -0800 (PST) Date: Tue, 13 Feb 2018 16:53:12 -0800 (PST) From: David Rientjes X-X-Sender: rientjes@chino.kir.corp.google.com To: Mike Kravetz cc: Andrew Morton , Jonathan Corbet , Vlastimil Babka , Mel Gorman , linux-kernel@vger.kernel.org, linux-mm@kvack.org, linux-doc@vger.kernel.org Subject: Re: [patch 1/2] mm, page_alloc: extend kernelcore and movablecore for percent In-Reply-To: Message-ID: References: User-Agent: Alpine 2.10 (DEB 1266 2009-07-14) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 13 Feb 2018, Mike Kravetz wrote: > > diff --git a/Documentation/admin-guide/kernel-parameters.txt b/Documentation/admin-guide/kernel-parameters.txt > > --- a/Documentation/admin-guide/kernel-parameters.txt > > +++ b/Documentation/admin-guide/kernel-parameters.txt > > @@ -1825,30 +1825,30 @@ > > keepinitrd [HW,ARM] > > > > kernelcore= [KNL,X86,IA-64,PPC] > > - Format: nn[KMGTPE] | "mirror" > > - This parameter > > - specifies the amount of memory usable by the kernel > > - for non-movable allocations. The requested amount is > > - spread evenly throughout all nodes in the system. The > > - remaining memory in each node is used for Movable > > - pages. In the event, a node is too small to have both > > - kernelcore and Movable pages, kernelcore pages will > > - take priority and other nodes will have a larger number > > - of Movable pages. The Movable zone is used for the > > - allocation of pages that may be reclaimed or moved > > - by the page migration subsystem. This means that > > - HugeTLB pages may not be allocated from this zone. > > - Note that allocations like PTEs-from-HighMem still > > - use the HighMem zone if it exists, and the Normal > > - zone if it does not. > > - > > - Instead of specifying the amount of memory (nn[KMGTPE]), > > - you can specify "mirror" option. In case "mirror" > > + Format: nn[KMGTPE] | nn% | "mirror" > > + This parameter specifies the amount of memory usable by > > + the kernel for non-movable allocations. The requested > > + amount is spread evenly throughout all nodes in the > > + system as ZONE_NORMAL. The remaining memory is used for > > + movable memory in its own zone, ZONE_MOVABLE. In the > > + event, a node is too small to have both ZONE_NORMAL and > > + ZONE_MOVABLE, kernelcore memory will take priority and > > + other nodes will have a larger ZONE_MOVABLE. > > + > > + ZONE_MOVABLE is used for the allocation of pages that > > + may be reclaimed or moved by the page migration > > + subsystem. This means that HugeTLB pages may not be > > + allocated from this zone. Note that allocations like > > + PTEs-from-HighMem still use the HighMem zone if it > > + exists, and the Normal zone if it does not. > > I know you are just updating the documentation for the new ability to > specify a percentage. However, while looking at this I noticed that > the existing description is out of date. HugeTLB pages CAN be treated > as movable and allocated from ZONE_MOVABLE. > > If you have to respin, could you drop that line while making this change? > Hi Mike, It's merged in -mm, so perhaps no respin is necessary. I think a general cleanup to this area regarding your work with hugetlb pages would be good. > > + > > + It is possible to specify the exact amount of memory in > > + the form of "nn[KMGTPE]", a percentage of total system > > + memory in the form of "nn%", or "mirror". If "mirror" > > option is specified, mirrored (reliable) memory is used > > for non-movable allocations and remaining memory is used > > - for Movable pages. nn[KMGTPE] and "mirror" are exclusive, > > - so you can NOT specify nn[KMGTPE] and "mirror" at the same > > - time. > > + for Movable pages. "nn[KMGTPE]", "nn%", and "mirror" > > + are exclusive, so you cannot specify multiple forms. > > > > kgdbdbgp= [KGDB,HW] kgdb over EHCI usb debug port. > > Format: [,poll interval] > > Don't you need to make the same type percentage changes for 'movablecore='? > The majority of the movablecore= documentation simply refers to the kernelcore= option as its complement, I'm not sure that we need to go in-depth into what the percentage specifiers mean for both options.