Re: [PATCH 15/21] mm: memmap_init: iterate over memblock regions rather that check each PFN
On 12.04.20 21:48, Mike Rapoport wrote: > From: Baoquan He > > When called during boot the memmap_init_zone() function checks if each PFN > is valid and actually belongs to the node being initialized using > early_pfn_valid() and early_pfn_in_nid(). > > Each such check may cost up to O(log(n)) where n is the number of memory > banks, so for large amount of memory overall time spent in early_pfn*() > becomes substantial. > > Since the information is anyway present in memblock, we can iterate over > memblock memory regions in memmap_init() and only call memmap_init_zone() > for PFN ranges that are know to be valid and in the appropriate node. > > Signed-off-by: Baoquan He > Signed-off-by: Mike Rapoport > --- > mm/page_alloc.c | 26 -- > 1 file changed, 16 insertions(+), 10 deletions(-) > > diff --git a/mm/page_alloc.c b/mm/page_alloc.c > index 7f6a3081edb8..c43ce8709457 100644 > --- a/mm/page_alloc.c > +++ b/mm/page_alloc.c > @@ -5995,14 +5995,6 @@ void __meminit memmap_init_zone(unsigned long size, > int nid, unsigned long zone, >* function. They do not exist on hotplugged memory. >*/ After this change, the comment above is stale. the "holes in boot-time mem_map" are handled by the caller now AFAIKs. > if (context == MEMMAP_EARLY) { > - if (!early_pfn_valid(pfn)) { > - pfn = next_pfn(pfn); > - continue; > - } > - if (!early_pfn_in_nid(pfn, nid)) { > - pfn++; > - continue; > - } > if (overlap_memmap_init(zone, &pfn)) > continue; > if (defer_init(nid, pfn, end_pfn)) -- Thanks, David / dhildenb ___ linux-snps-arc mailing list linux-snps-arc@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-snps-arc
Re: [PATCH v6 04/13] ARC: Atomics and Locking primitives
On 4/23/20 10:20 AM, Adhemerval Zanella via Libc-alpha wrote: > > > On 22/04/2020 22:41, Vineet Gupta via Libc-alpha wrote: >> Signed-off-by: Vineet Gupta > > glibc uses copyright assignment to the FSF for contributions, and not > the DCO. Ok removed from all patches. >> --- >> sysdeps/arc/atomic-machine.h | 69 +++ >> sysdeps/arc/nptl/bits/semaphore.h | 32 ++ >> 2 files changed, 101 insertions(+) >> create mode 100644 sysdeps/arc/atomic-machine.h >> create mode 100644 sysdeps/arc/nptl/bits/semaphore.h >> > >> diff --git a/sysdeps/arc/nptl/bits/semaphore.h >> b/sysdeps/arc/nptl/bits/semaphore.h >> new file mode 100644 >> index ..772dc4cb9b01 >> --- /dev/null >> +++ b/sysdeps/arc/nptl/bits/semaphore.h > > This might a good candidate to a refactor to add a Linux default one, > thus avoiding any new architecture to copy/paste it. Sure. (1). s390, sparc: __SIZEOF_SEM_T {16,32} if WORDSIZE == {32,64} (2). arc, arm, csky, hppa, microblaze, nios2, sh:__SIZEOF_SEM_T 16 (32-bit arch) (3). ia64: __SIZEOF_SEM_T 16 (64-bit only) (4). aarch64, mips, riscv are bimodal too but use arch specific knobs to build for 32/64 bit. Can we change 2, 3, 4, to use generic mechanism of (1) ? The constraints come automatically given WORDSIZE will be function of arch + ABI (ILP32, LP64 etc) Or else we can have (2) be the Linux default version and all others come from arch sysdep. ___ linux-snps-arc mailing list linux-snps-arc@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-snps-arc
Re: [PATCH] CMD: random: fix return code
Hi Simon, Tom, I guess it's perfect time to apply this patch. Thanks! --- Eugeniy Paltsev From: Simon Glass Sent: Monday, March 23, 2020 18:37 To: Eugeniy Paltsev Cc: Tom Rini; U-Boot Mailing List; uboot-snps-...@synopsys.com; Alexey Brodkin; linux-snps-arc@lists.infradead.org Subject: Re: [PATCH] CMD: random: fix return code On Fri, 20 Mar 2020 at 10:38, Eugeniy Paltsev wrote: > > As of today 'random' command return 1 (CMD_RET_FAILURE) in case > of successful execution and 0 (CMD_RET_SUCCESS) in case of bad > arguments. Fix that. > > NOTE: we remove printing usage information from command body > so it won't print twice. > > Signed-off-by: Eugeniy Paltsev > --- > cmd/mem.c | 9 - > 1 file changed, 4 insertions(+), 5 deletions(-) > Reviewed-by: Simon Glass ___ linux-snps-arc mailing list linux-snps-arc@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-snps-arc