linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* 2.5.69-mm3
@ 2003-05-08  8:39 Andrew Morton
  2003-05-09 14:10 ` 2.5.69-mm3 Dipankar Sarma
                   ` (4 more replies)
  0 siblings, 5 replies; 11+ messages in thread
From: Andrew Morton @ 2003-05-08  8:39 UTC (permalink / raw)
  To: linux-kernel, linux-mm

http://www.zip.com.au/~akpm/linux/patches/2.5/2.5.69-mm3.gz

  Will appear sometime at

ftp://ftp.kernel.org/pub/linux/kernel/people/akpm/patches/2.5/2.5.69/2.5.69-mm3/


Small things.  Mainly a resync for various people...




Changes since 2.5.69-mm2:


 linus.patch

 Latest from Linus

-generic-subarch.patch
-altinstruction-linkage-fix.patch
-cpia-section-fix.patch
-opl3sa2-compile-fix.patch
-alloc_skb-remove-debug-check.patch
-misc.patch
-mwave-build-fix.patch
-drm-timer-init-fix.patch
-slab-init-fixes.patch
-sysrq-fs-cleanups.patch
-UPDATE_ATIME-update_atime.patch
-irqreturn-pcmcia_cs.patch
-printscreen-fix.patch
-disk_name-no-devfs.patch
-devfs-01-api-change.patch
-remove-partition_name.patch
-switch-to-devfs_mk_bdev.patch
-386-access_ok-race-fix.patch
-swapfile-hold-i_sem.patch
-dont-set-kernel-pgd-on-PAE.patch
-nobody-listens-to-wli.patch
-shrink_slab-accounting.patch
-slab-debugging-improvement.patch
-fget-speedup.patch
-fget_light-fix.patch
-i8042-share-irqs.patch
-select-speedup.patch
-security_d_instantiate-movement.patch
-ext3-security-xattr.patch
-ext2-security-xattr.patch
-lsm-setxattr-changes.patch
-sunrpc-gcc-bug-workaround.patch

 Merged

+ppc64-xics-irq-fix.patch

 ppc64 IRQ return fix

+hrtimers-fix-signone.patch

 High-res timers fix

+netfilter-skbuff-fix.patch

 Might fix a netfilter oops

+ext3-quota-reservation-fix.patch

 Fix possible BUG with ext3+quotas

+quota-reference-drop-fix.patch

 Quota fix

+visws-logo-fix.patch

 visws fbcon logo fix

-dcache_lock-vs-tasklist_lock-take-2.patch

 Dropped for now - Manfred is redoing it.

+vmalloc-race-fix.patch

 Fix nasty race in vmalloc/vfree.  Seems to only happen on preempt.  This
 will fix the select()-related oops whch Felix von Leitner reported.  Kudos
 to Mister Irwin.

+as-small-hashes.patch

 Reduce anticipatory scheduler memory footprint

+tty-64-bit-dev_t-warning-fix.patch

 Warning fix

+security-process-attribute-api.patch

 Security API work

+thread-info-in-task_struct.patch

 Infrastructure for supporting ia64 oddness

-T25-cciss-C69.patch
-T26-cpqarray-C69.patch
-T27-kobject-C69.patch
-T28-tty-C69.patch
-T29-kobj_map-C69.patch
-T30-cdev-C69.patch
-T31-i_cdev-C69.patch

 The tty changes broke these.




All 104 patches:


linus.patch

mm.patch
  add -mmN to EXTRAVERSION

kgdb-ga.patch
  kgdb stub for ia32 (George Anzinger's one)

ipmi-warning-fixes.patch

irqreturn-uml.patch
  UML updates for the new IRQ API

irqreturn-aic79xx.patch
  Fix aic79xx for new IRQ API

irqreturn-drivers-net.patch

slab-magazine-layer.patch
  magazine layer for slab

config_spinline.patch
  uninline spinlocks for profiling accuracy.

ppc64-ioctl-pci-update.patch
  From: Anton Blanchard <anton@samba.org>
  Subject: ppc64 stuff

ppc64-reloc_hide.patch

ppc64-aio-32bit-emulation.patch
  32/64bit emulation for aio

ppc64-scruffiness.patch
  Fix some PPC64 compile warnings

ppc64-xics-irq-fix.patch
  PPC64 irq return fix

sym-do-160.patch
  make the SYM driver do 160 MB/sec

hrtimers-fix-signone.patch
  hrtimers: fix timer_create(2) && SIGEV_NONE

netfilter-skbuff-fix.patch
  netfilter skbuff BUGfix

irqreturn-snd-via-fix.patch
  via sound irqreturn fix

irq_cpustat-cleanup.patch
  irq_cpustat cleanup

config-PAGE_OFFSET.patch
  Configurable kenrel/user memory split

fat-speedup.patch
  fat cluster search speedup

irq-check-rate-limit.patch
  IRQs: handle bad return values from handlers

irq_desc-others.patch
  Fix up irq_desc initialisation for non-ia32

ext3-quota-reservation-fix.patch
  Quota write transaction size fix

quota-reference-drop-fix.patch
  dquot_transfer() fix

buffer-debug.patch
  buffer.c debugging

ext3-truncate-ordered-pages.patch
  ext3: explicitly free truncated pages

3c59x-irq-fix.patch

VM_RESERVED-check.patch
  VM_RESERVED check

exit_mmap-TASK_SIZE.patch
  exit_mmap() TASK_SIZE fix

semop-race-fix-2.patch
  semop race fix #2

nfs-writeback-tweak.patch
  Tweak to NFS memory management for writes...

reiserfs_file_write-5.patch

visws-logo-fix.patch
  visws: fix penguin with sgi logo

clustered-io_apic-fix.patch
  Subject: [RFC][PATCH] fix for clusterd io_apics

rcu-stats.patch
  RCU statistics reporting

ext3-journalled-data-assertion-fix.patch
  Remove incorrect assertion from ext3

ide_setting_sem-fix.patch

reslabify-pgds-and-pmds.patch
  re-slabify i386 pgd's and pmd's

nfs-speedup.patch

nfs-oom-fix.patch
  nfs oom fix

sk-allocation.patch
  Subject: Re: nfs oom

nfs-more-oom-fix.patch

rpciod-atomic-allocations.patch
  Make rcpiod use atomic allocations

linux-isp.patch

isp-update-1.patch

clone-retval-fix.patch
  copy_process return value fix

de_thread-fix.patch
  de_thread memory corruption fix

list_del-debug.patch
  list_del debug check

airo-schedule-fix.patch
  airo.c: don't sleep in atomic regions

synaptics-mouse-support.patch
  Add Synaptics touchpad tweaking to psmouse driver

vmalloc-race-fix.patch
  vmalloc race fix

rq-dyn-works.patch
  rq-dyn, dynamic request allocation

kblockd.patch
  Create `kblockd' workqueue

cfq-infrastructure.patch

elevator-completion-api.patch
  elevator completion API

as-iosched.patch
  anticipatory I/O scheduler

as-use-completion.patch
  AS use completion notifier

as-remove-debug-checks.patch
  AS: remove debug checks

as-iosched-dyn.patch
  AS: update to dynamic request allocation API

as-monitor-seek-distance.patch
  AS: monitor seek distance

as-div64-fix.patch
  as: don't do 64-bit divides

as-small-hashes.patch
  AS: smaller hashes

unplug-use-kblockd.patch
  Use kblockd for running request queues

cfq-2.patch
  CFQ scheduler, #2

cfq-iosched-dyn.patch
  CFQ: update to rq-dyn API

unmap-page-debugging.patch
  unmap unused pages for debugging

fremap-all-mappings.patch
  Make all executable mappings be nonlinear

sched-2.5.68-B2.patch
  HT scheduler, sched-2.5.68-B2

sched-numa-warning-fix.patch
  scheduler warning fix for NUMA

sched_idle-typo-fix.patch
  fix sched_idle typo

kgdb-ga-idle-fix.patch

acpi-irq-ret-fix.patch
  acpi irq return value fix

sound-irq-hack.patch

oprofile-build-fix.patch
  Fix arch/i386/oprofile/init.c build error

sched-2.5.64-D3.patch
  sched-2.5.64-D3, more interactivity changes

sched_best_cpu-fix.patch
  sched_best_cpu does not pick best cpu

sched_best_cpu-fix-2.patch
  sched_best_cpu does not pick best cpu (2/2)

generic_hweight64-fix.patch

show_task-free-stack-fix.patch
  show_task() fix and cleanup

htree-nfs-fix.patch
  Fix ext3 htree / NFS compatibility problems

htree-nfs-fix-2.patch
  htree nfs fix

htree-leak-fix.patch
  ext3: htree memory leak fix

put_task_struct-debug.patch

ia32-mknod64.patch
  mknod64 for ia32

ext2-64-bit-special-inodes.patch
  ext2: support for 64-bit device nodes

ext3-64-bit-special-inodes.patch
  ext3: support for 64-bit device nodes

64-bit-dev_t-kdev_t.patch
  64-bit dev_t and kdev_t

tty-64-bit-dev_t-warning-fix.patch
  tty layer 64-bit dev_t printk warning fix

oops-dump-preceding-code.patch
  i386 oops output: dump preceding code

lockmeter.patch

security-process-attribute-api.patch
  Process Attribute API for Security Modules

thread-info-in-task_struct.patch
  allow thread_info to be allocated as part of task_struct

ext3-no-bkl.patch

journal_dirty_metadata-speedup.patch

journal_get_write_access-speedup.patch

ext3-concurrent-block-inode-allocation.patch
  Subject: [PATCH] concurrent block/inode allocation for EXT3

ext3-orlov-approx-counter-fix.patch
  Fix orlov allocator boundary case

ext3-concurrent-block-allocation-fix-1.patch

ext3-concurrent-block-allocation-hashed.patch
  Subject: Re: [PATCH] concurrent block/inode allocation for EXT3

pcmcia-deadlock-fix-2.patch
  Fix PCMCIA deadlock (rev. 2)

pcmcia-fix.patch

kexec.patch
  kexec

fbdev-updates.patch
  Fbdev update patch



--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"aart@kvack.org"> aart@kvack.org </a>

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: 2.5.69-mm3
  2003-05-08  8:39 2.5.69-mm3 Andrew Morton
@ 2003-05-09 14:10 ` Dipankar Sarma
  2003-05-09 19:49   ` 2.5.69-mm3 Martin J. Bligh
                     ` (2 more replies)
  2003-05-09 14:53 ` 2.5.69-mm3 William Lee Irwin III
                   ` (3 subsequent siblings)
  4 siblings, 3 replies; 11+ messages in thread
From: Dipankar Sarma @ 2003-05-09 14:10 UTC (permalink / raw)
  To: Andrew Morton; +Cc: linux-kernel, linux-mm

On Thu, May 08, 2003 at 08:41:12AM +0000, Andrew Morton wrote:
> http://www.zip.com.au/~akpm/linux/patches/2.5/2.5.69-mm3.gz
> 
>   Will appear sometime at
> 
> ftp://ftp.kernel.org/pub/linux/kernel/people/akpm/patches/2.5/2.5.69/2.5.69-mm3/
> 
> 
> Small things.  Mainly a resync for various people...
> 
> rcu-stats.patch
>   RCU statistics reporting

I am wondering what we should do with this patch. The RCU stats display
the #s of RCU requests and actual updates on each CPU. On a normal system
they don't mean much to a sysadmin, so I am not sure if it is the right
thing to include this feature. OTOH, it is extremely useful to detect
potential memory leaks happening due to, say a CPU looping in
kernel (and RCU not happening consequently). Will a CONFIG_RCU_DEBUG
make it more palatable for mainline ?

Thanks
Dipankar
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"aart@kvack.org"> aart@kvack.org </a>

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: 2.5.69-mm3
  2003-05-08  8:39 2.5.69-mm3 Andrew Morton
  2003-05-09 14:10 ` 2.5.69-mm3 Dipankar Sarma
@ 2003-05-09 14:53 ` William Lee Irwin III
  2003-05-09 15:37 ` 2.5.69-mm3 William Lee Irwin III
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 11+ messages in thread
From: William Lee Irwin III @ 2003-05-09 14:53 UTC (permalink / raw)
  To: Andrew Morton; +Cc: linux-kernel, linux-mm

On Thu, May 08, 2003 at 01:39:58AM -0700, Andrew Morton wrote:
> http://www.zip.com.au/~akpm/linux/patches/2.5/2.5.69-mm3.gz
>   Will appear sometime at
> ftp://ftp.kernel.org/pub/linux/kernel/people/akpm/patches/2.5/2.5.69/2.5.69-mm3/

This comment looks stale; AIUI the behavior coded is what's desired.
This came up in a discussion with some implementors of a language
runtime about the cause of failures to open large files.

-- wli

diff -prauN linux-2.5.69-1/fs/open.c open-2.5.69-1/fs/open.c
--- linux-2.5.69-1/fs/open.c	Wed Apr  9 06:42:36 2003
+++ open-2.5.69-1/fs/open.c	Fri May  9 07:19:25 2003
@@ -902,7 +902,7 @@
 
 /*
  * Called when an inode is about to be open.
- * We use this to disallow opening RW large files on 32bit systems if
+ * We use this to disallow opening large files on 32bit systems if
  * the caller didn't specify O_LARGEFILE.  On 64bit systems we force
  * on this flag in sys_open.
  */
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"aart@kvack.org"> aart@kvack.org </a>

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: 2.5.69-mm3
  2003-05-08  8:39 2.5.69-mm3 Andrew Morton
  2003-05-09 14:10 ` 2.5.69-mm3 Dipankar Sarma
  2003-05-09 14:53 ` 2.5.69-mm3 William Lee Irwin III
@ 2003-05-09 15:37 ` William Lee Irwin III
  2003-05-09 17:55 ` 2.5.69-mm3 William Lee Irwin III
  2003-05-09 18:12 ` 2.5.69-mm3 William Lee Irwin III
  4 siblings, 0 replies; 11+ messages in thread
From: William Lee Irwin III @ 2003-05-09 15:37 UTC (permalink / raw)
  To: Andrew Morton; +Cc: linux-kernel, linux-mm

On Thu, May 08, 2003 at 01:39:58AM -0700, Andrew Morton wrote:
> http://www.zip.com.au/~akpm/linux/patches/2.5/2.5.69-mm3.gz
>   Will appear sometime at
> 
> ftp://ftp.kernel.org/pub/linux/kernel/people/akpm/patches/2.5/2.5.69/2.5.69-mm3/

I was just looking over this and noticed 2.4.x makes u64 dma_addr_t
conditional on CONFIG_HIGHMEM64G where 2.5.x uses CONFIG_HIGHMEM. It's
clearly not necessary on CONFIG_HIGHMEM4G, hence this obvious (but
untested) patch:

-- wli


diff -prauN linux-2.5.69-1/include/asm-i386/types.h types-2.5.69-1/include/asm-i386/types.h
--- linux-2.5.69-1/include/asm-i386/types.h	Mon Dec 30 20:14:21 2002
+++ types-2.5.69-1/include/asm-i386/types.h	Fri May  9 08:29:57 2003
@@ -51,7 +51,7 @@
 
 /* DMA addresses come in generic and 64-bit flavours.  */
 
-#ifdef CONFIG_HIGHMEM
+#ifdef CONFIG_HIGHMEM64G
 typedef u64 dma_addr_t;
 #else
 typedef u32 dma_addr_t;
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"aart@kvack.org"> aart@kvack.org </a>

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: 2.5.69-mm3
  2003-05-08  8:39 2.5.69-mm3 Andrew Morton
                   ` (2 preceding siblings ...)
  2003-05-09 15:37 ` 2.5.69-mm3 William Lee Irwin III
@ 2003-05-09 17:55 ` William Lee Irwin III
  2003-05-09 18:12 ` 2.5.69-mm3 William Lee Irwin III
  4 siblings, 0 replies; 11+ messages in thread
From: William Lee Irwin III @ 2003-05-09 17:55 UTC (permalink / raw)
  To: Andrew Morton; +Cc: linux-kernel, linux-mm

On Thu, May 08, 2003 at 01:39:58AM -0700, Andrew Morton wrote:
> http://www.zip.com.au/~akpm/linux/patches/2.5/2.5.69-mm3.gz
>   Will appear sometime at
> ftp://ftp.kernel.org/pub/linux/kernel/people/akpm/patches/2.5/2.5.69/2.5.69-mm3/

Microscopic hugetlb cleanup: some variables static to hugetlbpage.c are
later declared as extern within a function in the same file. This patch
removes their declaration.


-- wli

diff -urpN mm3-2.5.69-1/arch/i386/mm/hugetlbpage.c mm3-2.5.69-2/arch/i386/mm/hugetlbpage.c
--- mm3-2.5.69-1/arch/i386/mm/hugetlbpage.c	2003-05-04 16:53:41.000000000 -0700
+++ mm3-2.5.69-2/arch/i386/mm/hugetlbpage.c	2003-05-09 10:27:57.000000000 -0700
@@ -20,8 +20,6 @@
 #include <asm/tlb.h>
 #include <asm/tlbflush.h>
 
-#include <linux/sysctl.h>
-
 static long    htlbpagemem;
 int     htlbpage_max;
 static long    htlbzone_pages;
@@ -398,8 +396,6 @@ int set_hugetlb_mem_size(int count)
 {
 	int lcount;
 	struct page *page;
-	extern long htlbzone_pages;
-	extern struct list_head htlbpage_freelist;
 
 	if (count < 0)
 		lcount = count;
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"aart@kvack.org"> aart@kvack.org </a>

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: 2.5.69-mm3
  2003-05-08  8:39 2.5.69-mm3 Andrew Morton
                   ` (3 preceding siblings ...)
  2003-05-09 17:55 ` 2.5.69-mm3 William Lee Irwin III
@ 2003-05-09 18:12 ` William Lee Irwin III
  2003-05-09 18:15   ` 2.5.69-mm3 William Lee Irwin III
  4 siblings, 1 reply; 11+ messages in thread
From: William Lee Irwin III @ 2003-05-09 18:12 UTC (permalink / raw)
  To: Andrew Morton; +Cc: linux-kernel, linux-mm

On Thu, May 08, 2003 at 01:39:58AM -0700, Andrew Morton wrote:
> http://www.zip.com.au/~akpm/linux/patches/2.5/2.5.69-mm3.gz
>   Will appear sometime at
> ftp://ftp.kernel.org/pub/linux/kernel/people/akpm/patches/2.5/2.5.69/2.5.69-mm3/

topology.h has a syntactic hygiene issue where it has a for () loop with
an if () in the body defined as a macro:

#define foo(...) for (...) if (...)

This patch prepares some of the bitop definitions used for the loop
mechanics to be usable in headers where BITS_PER_LONG is not guaranteed
to be defined for some reason. It removes the #ifdef on BITS_PER_LONG
in favor of if (sizeof(...) == ...) tests so hweight_long() will be
defined even when BITS_PER_LONG is not. unsigned long is also used for
some variables and/or return types that changed size with BITS_PER_LONG.
The 32-bit generic_hweight64() also changed its argument from a pointer
to a u64, which actually makes for a consistent interface in both cases.

The follow-up will make use of this to clean up the hygiene issue above
and correct a compilation error in topology.h


-- wli


diff -urpN mm3-2.5.69-1/include/linux/bitops.h mm3-2.5.69-2/include/linux/bitops.h
--- mm3-2.5.69-1/include/linux/bitops.h	2003-05-09 09:22:16.000000000 -0700
+++ mm3-2.5.69-2/include/linux/bitops.h	2003-05-09 10:27:57.000000000 -0700
@@ -1,5 +1,6 @@
 #ifndef _LINUX_BITOPS_H
 #define _LINUX_BITOPS_H
+#include <asm/types.h>
 #include <asm/bitops.h>
 
 /*
@@ -107,11 +108,14 @@ static inline unsigned int generic_hweig
         return (res & 0x0F) + ((res >> 4) & 0x0F);
 }
 
-#if (BITS_PER_LONG == 64)
-
-static inline u64 generic_hweight64(u64 w)
+static inline unsigned long generic_hweight64(u64 w)
 {
-        u64 res = (w & 0x5555555555555555) + ((w >> 1) & 0x5555555555555555);
+	u64 res;
+	if (sizeof(unsigned long) == 4)
+		return generic_hweight32((unsigned long)(w >> 32)) +
+					generic_hweight32((unsigned long)w);
+
+	res = (w & 0x5555555555555555) + ((w >> 1) & 0x5555555555555555);
         res = (res & 0x3333333333333333) + ((res >> 2) & 0x3333333333333333);
         res = (res & 0x0F0F0F0F0F0F0F0F) + ((res >> 4) & 0x0F0F0F0F0F0F0F0F);
         res = (res & 0x00FF00FF00FF00FF) + ((res >> 8) & 0x00FF00FF00FF00FF);
@@ -119,22 +123,9 @@ static inline u64 generic_hweight64(u64 
         return (res & 0x00000000FFFFFFFF) + ((res >> 32) & 0x00000000FFFFFFFF);
 }
 
-#define hweight_long(w)	generic_hweight64(w)
-
-#endif /* BITS_PER_LONG == 64 */
-
-#if (BITS_PER_LONG == 32)
-
-static inline unsigned int generic_hweight64(unsigned int *w)
+static inline unsigned long hweight_long(unsigned long x)
 {
-	return generic_hweight32(w[0]) + generic_hweight32(w[1]);
+	return sizeof(x) == 4 ? generic_hweight32(x) : generic_hweight64(x);
 }
 
-#define hweight_long(w)	generic_hweight32(w)
-
-#endif /* BITS_PER_LONG == 32 */
-
-#include <asm/bitops.h>
-
-
 #endif
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"aart@kvack.org"> aart@kvack.org </a>

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: 2.5.69-mm3
  2003-05-09 18:12 ` 2.5.69-mm3 William Lee Irwin III
@ 2003-05-09 18:15   ` William Lee Irwin III
  2003-05-09 18:54     ` 2.5.69-mm3 William Lee Irwin III
  0 siblings, 1 reply; 11+ messages in thread
From: William Lee Irwin III @ 2003-05-09 18:15 UTC (permalink / raw)
  To: Andrew Morton, linux-kernel, linux-mm

On Fri, May 09, 2003 at 11:12:57AM -0700, William Lee Irwin III wrote:
> topology.h has a syntactic hygiene issue where it has a for () loop with
> an if () in the body defined as a macro:
> #define foo(...) for (...) if (...)
> This patch prepares some of the bitop definitions used for the loop
> mechanics to be usable in headers where BITS_PER_LONG is not guaranteed
> to be defined for some reason. It removes the #ifdef on BITS_PER_LONG
> in favor of if (sizeof(...) == ...) tests so hweight_long() will be
> defined even when BITS_PER_LONG is not. unsigned long is also used for
> some variables and/or return types that changed size with BITS_PER_LONG.
> The 32-bit generic_hweight64() also changed its argument from a pointer
> to a u64, which actually makes for a consistent interface in both cases.
> The follow-up will make use of this to clean up the hygiene issue above
> and correct a compilation error in topology.h


diff -urpN mm3-2.5.69-1/include/linux/topology.h mm3-2.5.69-2/include/linux/topology.h
--- mm3-2.5.69-1/include/linux/topology.h	2003-05-09 09:22:16.000000000 -0700
+++ mm3-2.5.69-2/include/linux/topology.h	2003-05-09 10:29:08.000000000 -0700
@@ -32,8 +32,15 @@
 
 #define nr_cpus_node(node)	(hweight_long(node_to_cpumask(node)))
 
+static inline int __next_node_with_cpus(int node)
+{
+	do
+		++node;
+	while (!nr_cpus_node(node) && node < numnodes);
+	return node;
+}
+
 #define for_each_node_with_cpus(node) \
-	for (node = 0; node < numnodes; node++) \
-		if (nr_cpus_node(node)
+	for (node = 0; node < numnodes; node = __next_node_with_cpus(node))
 
 #endif /* _LINUX_TOPOLOGY_H */
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"aart@kvack.org"> aart@kvack.org </a>

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: 2.5.69-mm3
  2003-05-09 18:15   ` 2.5.69-mm3 William Lee Irwin III
@ 2003-05-09 18:54     ` William Lee Irwin III
  0 siblings, 0 replies; 11+ messages in thread
From: William Lee Irwin III @ 2003-05-09 18:54 UTC (permalink / raw)
  To: Andrew Morton, linux-kernel, linux-mm

On Fri, May 09, 2003 at 11:15:35AM -0700, William Lee Irwin III wrote:
+static inline int __next_node_with_cpus(int node)
+{
+	do
+		++node;
+	while (!nr_cpus_node(node) && node < numnodes);
+	return node;
+}

GRRR, neither seems to hurt my booting it or cause warnings but there
are two mistakes:

(1) not checking node < numnodes before !nr_cpus_node()
(2) casting the arg of generic_hweight32() to unsigned long is wrong

Fixed patch(es) below.


-- wli


diff -urpN mm3-2.5.69-1/include/linux/bitops.h mm3-2.5.69-2/include/linux/bitops.h
--- mm3-2.5.69-1/include/linux/bitops.h	2003-05-09 09:22:16.000000000 -0700
+++ mm3-2.5.69-2/include/linux/bitops.h	2003-05-09 11:30:09.000000000 -0700
@@ -1,5 +1,6 @@
 #ifndef _LINUX_BITOPS_H
 #define _LINUX_BITOPS_H
+#include <asm/types.h>
 #include <asm/bitops.h>
 
 /*
@@ -107,11 +108,14 @@ static inline unsigned int generic_hweig
         return (res & 0x0F) + ((res >> 4) & 0x0F);
 }
 
-#if (BITS_PER_LONG == 64)
-
-static inline u64 generic_hweight64(u64 w)
+static inline unsigned long generic_hweight64(u64 w)
 {
-        u64 res = (w & 0x5555555555555555) + ((w >> 1) & 0x5555555555555555);
+	u64 res;
+	if (sizeof(unsigned long) == 4)
+		return generic_hweight32((unsigned int)(w >> 32)) +
+					generic_hweight32((unsigned int)w);
+
+	res = (w & 0x5555555555555555) + ((w >> 1) & 0x5555555555555555);
         res = (res & 0x3333333333333333) + ((res >> 2) & 0x3333333333333333);
         res = (res & 0x0F0F0F0F0F0F0F0F) + ((res >> 4) & 0x0F0F0F0F0F0F0F0F);
         res = (res & 0x00FF00FF00FF00FF) + ((res >> 8) & 0x00FF00FF00FF00FF);
@@ -119,22 +123,9 @@ static inline u64 generic_hweight64(u64 
         return (res & 0x00000000FFFFFFFF) + ((res >> 32) & 0x00000000FFFFFFFF);
 }
 
-#define hweight_long(w)	generic_hweight64(w)
-
-#endif /* BITS_PER_LONG == 64 */
-
-#if (BITS_PER_LONG == 32)
-
-static inline unsigned int generic_hweight64(unsigned int *w)
+static inline unsigned long hweight_long(unsigned long x)
 {
-	return generic_hweight32(w[0]) + generic_hweight32(w[1]);
+	return sizeof(x) == 4 ? generic_hweight32(x) : generic_hweight64(x);
 }
 
-#define hweight_long(w)	generic_hweight32(w)
-
-#endif /* BITS_PER_LONG == 32 */
-
-#include <asm/bitops.h>
-
-
 #endif
diff -urpN mm3-2.5.69-1/include/linux/topology.h mm3-2.5.69-2/include/linux/topology.h
--- mm3-2.5.69-1/include/linux/topology.h	2003-05-09 09:22:16.000000000 -0700
+++ mm3-2.5.69-2/include/linux/topology.h	2003-05-09 11:29:52.000000000 -0700
@@ -32,8 +32,15 @@
 
 #define nr_cpus_node(node)	(hweight_long(node_to_cpumask(node)))
 
+static inline int __next_node_with_cpus(int node)
+{
+	do
+		++node;
+	while (node < numnodes && !nr_cpus_node(node));
+	return node;
+}
+
 #define for_each_node_with_cpus(node) \
-	for (node = 0; node < numnodes; node++) \
-		if (nr_cpus_node(node)
+	for (node = 0; node < numnodes; node = __next_node_with_cpus(node))
 
 #endif /* _LINUX_TOPOLOGY_H */
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"aart@kvack.org"> aart@kvack.org </a>

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: 2.5.69-mm3
  2003-05-09 14:10 ` 2.5.69-mm3 Dipankar Sarma
@ 2003-05-09 19:49   ` Martin J. Bligh
  2003-05-09 21:18   ` 2.5.69-mm3 Andrew Morton
  2003-05-13 20:13   ` 2.5.69-mm3 Bill Davidsen
  2 siblings, 0 replies; 11+ messages in thread
From: Martin J. Bligh @ 2003-05-09 19:49 UTC (permalink / raw)
  To: dipankar, Andrew Morton; +Cc: linux-kernel, linux-mm

> I am wondering what we should do with this patch. The RCU stats display
> the #s of RCU requests and actual updates on each CPU. On a normal system
> they don't mean much to a sysadmin, so I am not sure if it is the right
> thing to include this feature. OTOH, it is extremely useful to detect
> potential memory leaks happening due to, say a CPU looping in
> kernel (and RCU not happening consequently). Will a CONFIG_RCU_DEBUG
> make it more palatable for mainline ?

I'd find that useful - if it has a measurable overhead. If not, just leave
it on all the time ;-)

M.

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"aart@kvack.org"> aart@kvack.org </a>

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: 2.5.69-mm3
  2003-05-09 14:10 ` 2.5.69-mm3 Dipankar Sarma
  2003-05-09 19:49   ` 2.5.69-mm3 Martin J. Bligh
@ 2003-05-09 21:18   ` Andrew Morton
  2003-05-13 20:13   ` 2.5.69-mm3 Bill Davidsen
  2 siblings, 0 replies; 11+ messages in thread
From: Andrew Morton @ 2003-05-09 21:18 UTC (permalink / raw)
  To: dipankar; +Cc: linux-kernel, linux-mm

Dipankar Sarma <dipankar@in.ibm.com> wrote:
>
> > rcu-stats.patch
> >   RCU statistics reporting
> 
> I am wondering what we should do with this patch.

How about we just keep it floating about in the experimental kernels?
Can't say that I use it for anything, really.

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"aart@kvack.org"> aart@kvack.org </a>

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: 2.5.69-mm3
  2003-05-09 14:10 ` 2.5.69-mm3 Dipankar Sarma
  2003-05-09 19:49   ` 2.5.69-mm3 Martin J. Bligh
  2003-05-09 21:18   ` 2.5.69-mm3 Andrew Morton
@ 2003-05-13 20:13   ` Bill Davidsen
  2 siblings, 0 replies; 11+ messages in thread
From: Bill Davidsen @ 2003-05-13 20:13 UTC (permalink / raw)
  To: Dipankar Sarma; +Cc: Andrew Morton, linux-kernel, linux-mm

On Fri, 9 May 2003, Dipankar Sarma wrote:

> I am wondering what we should do with this patch. The RCU stats display
> the #s of RCU requests and actual updates on each CPU. On a normal system
> they don't mean much to a sysadmin, so I am not sure if it is the right
> thing to include this feature. OTOH, it is extremely useful to detect
> potential memory leaks happening due to, say a CPU looping in
> kernel (and RCU not happening consequently). Will a CONFIG_RCU_DEBUG
> make it more palatable for mainline ?

Are there similar things, inplace or in patches? Perhaps a menu section
for kernel metrics and a nice little niche in /proc to display them?
Things like this are helpful when tuning a kernel, but perhaps not wanted
for the minimalist (like embedded) configs.

-- 
bill davidsen <davidsen@tmr.com>
  CTO, TMR Associates, Inc
Doing interesting things with little computers since 1979.

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"aart@kvack.org"> aart@kvack.org </a>

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2003-05-13 20:13 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-05-08  8:39 2.5.69-mm3 Andrew Morton
2003-05-09 14:10 ` 2.5.69-mm3 Dipankar Sarma
2003-05-09 19:49   ` 2.5.69-mm3 Martin J. Bligh
2003-05-09 21:18   ` 2.5.69-mm3 Andrew Morton
2003-05-13 20:13   ` 2.5.69-mm3 Bill Davidsen
2003-05-09 14:53 ` 2.5.69-mm3 William Lee Irwin III
2003-05-09 15:37 ` 2.5.69-mm3 William Lee Irwin III
2003-05-09 17:55 ` 2.5.69-mm3 William Lee Irwin III
2003-05-09 18:12 ` 2.5.69-mm3 William Lee Irwin III
2003-05-09 18:15   ` 2.5.69-mm3 William Lee Irwin III
2003-05-09 18:54     ` 2.5.69-mm3 William Lee Irwin III

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox