From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.8 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, MENTIONS_GIT_HOSTING,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 51ED4C47404 for ; Tue, 8 Oct 2019 03:13:48 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id DA0A3206B6 for ; Tue, 8 Oct 2019 03:13:47 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lca.pw header.i=@lca.pw header.b="XzLNbrfT" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org DA0A3206B6 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=lca.pw Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 4A92D8E0005; Mon, 7 Oct 2019 23:13:47 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 4594E8E0003; Mon, 7 Oct 2019 23:13:47 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 36F318E0005; Mon, 7 Oct 2019 23:13:47 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0248.hostedemail.com [216.40.44.248]) by kanga.kvack.org (Postfix) with ESMTP id 162768E0003 for ; Mon, 7 Oct 2019 23:13:47 -0400 (EDT) Received: from smtpin28.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay03.hostedemail.com (Postfix) with SMTP id AEDF3824CA3A for ; Tue, 8 Oct 2019 03:13:46 +0000 (UTC) X-FDA: 76019147652.28.hose55_3e08f799c6a1a X-HE-Tag: hose55_3e08f799c6a1a X-Filterd-Recvd-Size: 4434 Received: from mail-qk1-f194.google.com (mail-qk1-f194.google.com [209.85.222.194]) by imf21.hostedemail.com (Postfix) with ESMTP for ; Tue, 8 Oct 2019 03:13:46 +0000 (UTC) Received: by mail-qk1-f194.google.com with SMTP id f16so15070115qkl.9 for ; Mon, 07 Oct 2019 20:13:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=lca.pw; s=google; h=content-transfer-encoding:from:mime-version:subject:date:message-id :references:cc:in-reply-to:to; bh=k1jtRAeOaxK7Ul65cB7+4rEhg8+ITd1FfgdHATr3gFs=; b=XzLNbrfTV15ifn94q1W1tmV2b63v41s33pJvIy2LyTtLUeWDJV253CwhI0iY06chQl akJ2eqHMY87ZLeHwyYv0019Rn6CDGmIbH7xeNJGfr252FvpbnT55VR0uETRZKxud4TeY O9Ygo6FpFdXSZm+XC5z0d20HxgrGwqAxLTNmukaSMOxm4lQhnlLs8WusO/yQ/uYkvkB5 DKjCJFC7LXKyj4qlDT/abdcP1awghfvhecbcj/EfXOYhY5XtweBz2k7L2lULDn+aj9fB CGWYwQmS2b2YNGHSfiK3l9tPt+Ew0LY+7E26qIOJiBb+ucz+4SsYZYXSyXgujbkX48yE DTrg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:content-transfer-encoding:from:mime-version :subject:date:message-id:references:cc:in-reply-to:to; bh=k1jtRAeOaxK7Ul65cB7+4rEhg8+ITd1FfgdHATr3gFs=; b=rV44wrILilmgOuWqjBEqy740/ACLAMpYEZDA6gx4AExtFa9aa7biUwd69TqkMVY+Cr 8b5ivKMk1jFYkXBwXdNvc0luCAkSkduO9yc+KnHMTjhEvIuxz6tvhvcHhywFXgLG1+kb x3YQLVT+eChwMr9m3pX6tY/iqiuXs0Toa9n9Zpp+74M+VoctLfmrvtPD4qteaGjEQ93v NGKglRuns6uhbknpNzC1YV8KXT2LEpRZZtiSSsw4n4QLa/EQcT+MeTuYdvkpW1y59x+2 rytHAgJ5VlCpMMM+IMVR7ncbowYQEi66MOYgwkyUc70SmBR8/65+pAuJHB39Kajw5zgR rA5w== X-Gm-Message-State: APjAAAW4jensVc0cTHVVftMbZkdBSHXx56nOb6tsI9p7IhsQ3D81leSv qJ40axYlbcmASA6pM9wx7cA2sA== X-Google-Smtp-Source: APXvYqykFi25JPH3avyzLX6DwM7JNOXhOrs/pgirMbGtTQuRmgmyJA4FN+R/a4qHdshFyD7tj/Uj7g== X-Received: by 2002:a37:a446:: with SMTP id n67mr26525074qke.132.1570504425426; Mon, 07 Oct 2019 20:13:45 -0700 (PDT) Received: from [192.168.1.183] (pool-71-184-117-43.bstnma.fios.verizon.net. [71.184.117.43]) by smtp.gmail.com with ESMTPSA id l3sm11166638qtc.33.2019.10.07.20.13.43 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 07 Oct 2019 20:13:44 -0700 (PDT) Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable From: Qian Cai Mime-Version: 1.0 (1.0) Subject: Re: [PATCH] shmem: add shmem_size option, set filesystem size Date: Mon, 7 Oct 2019 23:13:42 -0400 Message-Id: References: <20191008011532.GB22291@spider> Cc: Hugh Dickins , linux-mm@kvack.org In-Reply-To: <20191008011532.GB22291@spider> To: -Gary- X-Mailer: iPhone Mail (17A860) X-Bogosity: Ham, tests=bogofilter, spamicity=0.000046, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: > On Oct 7, 2019, at 9:15 PM, -Gary- wrote: >=20 > The use case here is a live distribution, where the initramfs is a standar= d filesystem. It is common for these types of distributions to unpack root i= nto memory. Most of them use SquashFS, and resize shmem using a smaller ini= tramfs first. >=20 > https://grml.org >=20 > In my case, I am unpacking straight from the initramfs to alleviate the ne= ed for a separate file and packaging everything in an ISO. It very well cou= ld be that I am the only person who has ever needed this, but it has been a r= equirement for my distribution. >=20 > https://sourceforge.net/projects/gary-os > https://github.com/garybgenett/gary-os >=20 > It is also possible that other live distributions are taking the approach t= hey are because of the current inability to load an initrd/initramfs directl= y into memory without manually resizing the shmem filesystem first. >=20 > Since I was in there hacking the feature, anyway, I thought it would be wo= rth submitting. >=20 > At the least, it should be a "#define", or something. Right now it is a h= ard-coded magic token. I am not sure if it worth the complication. Right now, you have the choice o= f resizing shmem like every body else or increasing your system memory a bit= . If there are more compiling reasons to bump the limit, it is probably more a= ppropriate to make it the default to use something like 75% memory if there i= sn=E2=80=99t much side-effect.=