Linux SNPS ARC Archive on lore.kernel.org
 help / color / Atom feed
From: Mike Rapoport <rppt@kernel.org>
To: Vineet Gupta <vgupta@synopsys.com>
Cc: linux-snps-arc@lists.infradead.org,
	Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com>,
	linux-kernel@vger.kernel.org, Mike Rapoport <rppt@kernel.org>,
	Mike Rapoport <rppt@linux.ibm.com>
Subject: [RFC/RFT PATCH v2 0/1] arc: add sparsemem support
Date: Thu,  9 Jul 2020 16:44:11 +0300
Message-ID: <20200709134412.1464453-1-rppt@kernel.org> (raw)

From: Mike Rapoport <rppt@linux.ibm.com>

Hi,

It took me a while to get back to it, but better late than never :)

This patch adds SPARSEMEM support as an alternative to DISCONTIGMEM in
the case when there are two DRAM banks populated.

I've verified that it boots on nsim, but I could not find a way to make
nsim emulate two memory banks.

There is slight improvement in the resulting kernel size for
nsim_700_defconfig with CONFIG_HIGHMEM=y.

If sparse actually works on a system with 2 DRAM banks and does not
introduce performance regression, I suggest to update this patch to
replace DISCONTIGMEM with SPARSEMEM on arc.

$ size discontig/vmlinux  sparse/vmlinux 
   text	   data	    bss	    dec	    hex	filename
3894379	1093092	 244932	5232403	 4fd713	discontig/vmlinux
3879040	1093964	 244956	5217960	 4f9ea8	sparse/vmlinux

$ ./scripts/bloat-o-meter ~/tmp/arc/discontig/vmlinux  ~/tmp/arc/sparse/vmlinux 
add/remove: 35/23 grow/shrink: 35/384 up/down: 8110/-26438 (-18328)
...
Total: Before=4282217, After=4263889, chg -0.43%


Mike Rapoport (1):
  arc: add sparsemem support

 arch/arc/Kconfig                 | 10 ++++++++++
 arch/arc/include/asm/sparsemem.h | 13 +++++++++++++
 arch/arc/mm/init.c               |  7 ++++++-
 3 files changed, 29 insertions(+), 1 deletion(-)
 create mode 100644 arch/arc/include/asm/sparsemem.h

-- 
2.26.2


_______________________________________________
linux-snps-arc mailing list
linux-snps-arc@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-snps-arc

             reply index

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-09 13:44 Mike Rapoport [this message]
2020-07-09 13:44 ` [RFC/RFT PATCH v2 1/1] " Mike Rapoport

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200709134412.1464453-1-rppt@kernel.org \
    --to=rppt@kernel.org \
    --cc=Eugeniy.Paltsev@synopsys.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-snps-arc@lists.infradead.org \
    --cc=rppt@linux.ibm.com \
    --cc=vgupta@synopsys.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

Linux SNPS ARC Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-snps-arc/0 linux-snps-arc/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-snps-arc linux-snps-arc/ https://lore.kernel.org/linux-snps-arc \
		linux-snps-arc@lists.infradead.org
	public-inbox-index linux-snps-arc

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.infradead.lists.linux-snps-arc


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git