All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ravikiran G Thirumalai <kiran@scalex86.org>
To: Andrew Morton <akpm@osdl.org>
Cc: linux-kernel@vger.kernel.org, dipankar@in.ibm.com,
	bharata@in.ibm.com, shai@scalex86.org,
	Rusty Russell <rusty@rustcorp.com.au>
Subject: [patch 4/11] mm: Reimplementation of dynamic per-cpu allocator -- change_alloc_percpu_users
Date: Tue, 13 Sep 2005 08:59:51 -0700	[thread overview]
Message-ID: <20050913155951.GF3570@localhost.localdomain> (raw)
In-Reply-To: <20050913155112.GB3570@localhost.localdomain>

Change all current users of alloc_percpu to the new alloc_percpu interface

Signed-off-by: Ravikiran Thirumalai <kiran@scalex86.org>
Signed-off-by: Shai Fultheim <shai@scalex86.org>

Index: alloc_percpu-2.6.13-rc6/include/linux/genhd.h
===================================================================
--- alloc_percpu-2.6.13-rc6.orig/include/linux/genhd.h	2005-08-15 15:26:40.979596750 -0400
+++ alloc_percpu-2.6.13-rc6/include/linux/genhd.h	2005-08-15 15:27:07.153232500 -0400
@@ -199,7 +199,7 @@
 #ifdef  CONFIG_SMP
 static inline int init_disk_stats(struct gendisk *disk)
 {
-	disk->dkstats = alloc_percpu(struct disk_stats);
+	disk->dkstats = alloc_percpu(struct disk_stats, GFP_KERNEL);
 	if (!disk->dkstats)
 		return 0;
 	return 1;
Index: alloc_percpu-2.6.13-rc6/include/linux/percpu_counter.h
===================================================================
--- alloc_percpu-2.6.13-rc6.orig/include/linux/percpu_counter.h	2005-08-15 15:26:40.983597000 -0400
+++ alloc_percpu-2.6.13-rc6/include/linux/percpu_counter.h	2005-08-15 15:27:07.153232500 -0400
@@ -30,7 +30,7 @@
 {
 	spin_lock_init(&fbc->lock);
 	fbc->count = 0;
-	fbc->counters = alloc_percpu(long);
+	fbc->counters = alloc_percpu(long, GFP_KERNEL);
 }
 
 static inline void percpu_counter_destroy(struct percpu_counter *fbc)
Index: alloc_percpu-2.6.13-rc6/net/core/neighbour.c
===================================================================
--- alloc_percpu-2.6.13-rc6.orig/net/core/neighbour.c	2005-08-15 15:26:40.983597000 -0400
+++ alloc_percpu-2.6.13-rc6/net/core/neighbour.c	2005-08-15 15:27:07.153232500 -0400
@@ -1350,7 +1350,7 @@
 	if (!tbl->kmem_cachep)
 		panic("cannot create neighbour cache");
 
-	tbl->stats = alloc_percpu(struct neigh_statistics);
+	tbl->stats = alloc_percpu(struct neigh_statistics, GFP_KERNEL);
 	if (!tbl->stats)
 		panic("cannot create neighbour cache statistics");
 	
Index: alloc_percpu-2.6.13-rc6/net/ipv4/af_inet.c
===================================================================
--- alloc_percpu-2.6.13-rc6.orig/net/ipv4/af_inet.c	2005-08-15 15:26:40.983597000 -0400
+++ alloc_percpu-2.6.13-rc6/net/ipv4/af_inet.c	2005-08-15 15:27:07.153232500 -0400
@@ -985,16 +985,16 @@
 
 static int __init init_ipv4_mibs(void)
 {
-	net_statistics[0] = alloc_percpu(struct linux_mib);
-	net_statistics[1] = alloc_percpu(struct linux_mib);
-	ip_statistics[0] = alloc_percpu(struct ipstats_mib);
-	ip_statistics[1] = alloc_percpu(struct ipstats_mib);
-	icmp_statistics[0] = alloc_percpu(struct icmp_mib);
-	icmp_statistics[1] = alloc_percpu(struct icmp_mib);
-	tcp_statistics[0] = alloc_percpu(struct tcp_mib);
-	tcp_statistics[1] = alloc_percpu(struct tcp_mib);
-	udp_statistics[0] = alloc_percpu(struct udp_mib);
-	udp_statistics[1] = alloc_percpu(struct udp_mib);
+	net_statistics[0] = alloc_percpu(struct linux_mib, GFP_KERNEL);
+	net_statistics[1] = alloc_percpu(struct linux_mib, GFP_KERNEL);
+	ip_statistics[0] = alloc_percpu(struct ipstats_mib, GFP_KERNEL);
+	ip_statistics[1] = alloc_percpu(struct ipstats_mib, GFP_KERNEL);
+	icmp_statistics[0] = alloc_percpu(struct icmp_mib, GFP_KERNEL);
+	icmp_statistics[1] = alloc_percpu(struct icmp_mib, GFP_KERNEL);
+	tcp_statistics[0] = alloc_percpu(struct tcp_mib, GFP_KERNEL);
+	tcp_statistics[1] = alloc_percpu(struct tcp_mib, GFP_KERNEL);
+	udp_statistics[0] = alloc_percpu(struct udp_mib, GFP_KERNEL);
+	udp_statistics[1] = alloc_percpu(struct udp_mib, GFP_KERNEL);
 	if (!
 	    (net_statistics[0] && net_statistics[1] && ip_statistics[0]
 	     && ip_statistics[1] && tcp_statistics[0] && tcp_statistics[1]
Index: alloc_percpu-2.6.13-rc6/net/ipv4/ipcomp.c
===================================================================
--- alloc_percpu-2.6.13-rc6.orig/net/ipv4/ipcomp.c	2005-08-15 15:26:40.983597000 -0400
+++ alloc_percpu-2.6.13-rc6/net/ipv4/ipcomp.c	2005-08-15 15:27:07.153232500 -0400
@@ -306,7 +306,7 @@
 	if (ipcomp_scratch_users++)
 		return ipcomp_scratches;
 
-	scratches = alloc_percpu(void *);
+	scratches = alloc_percpu(void *, GFP_KERNEL);
 	if (!scratches)
 		return NULL;
 
@@ -380,7 +380,7 @@
 	INIT_LIST_HEAD(&pos->list);
 	list_add(&pos->list, &ipcomp_tfms_list);
 
-	pos->tfms = tfms = alloc_percpu(struct crypto_tfm *);
+	pos->tfms = tfms = alloc_percpu(struct crypto_tfm *, GFP_KERNEL);
 	if (!tfms)
 		goto error;
 
Index: alloc_percpu-2.6.13-rc6/net/ipv4/route.c
===================================================================
--- alloc_percpu-2.6.13-rc6.orig/net/ipv4/route.c	2005-08-15 15:26:40.987597250 -0400
+++ alloc_percpu-2.6.13-rc6/net/ipv4/route.c	2005-08-15 15:27:07.157232750 -0400
@@ -3154,7 +3154,7 @@
 	ipv4_dst_ops.gc_thresh = (rt_hash_mask + 1);
 	ip_rt_max_size = (rt_hash_mask + 1) * 16;
 
-	rt_cache_stat = alloc_percpu(struct rt_cache_stat);
+	rt_cache_stat = alloc_percpu(struct rt_cache_stat, GFP_KERNEL);
 	if (!rt_cache_stat)
 		return -ENOMEM;
 
Index: alloc_percpu-2.6.13-rc6/net/ipv6/ipcomp6.c
===================================================================
--- alloc_percpu-2.6.13-rc6.orig/net/ipv6/ipcomp6.c	2005-08-15 15:26:40.987597250 -0400
+++ alloc_percpu-2.6.13-rc6/net/ipv6/ipcomp6.c	2005-08-15 15:27:07.157232750 -0400
@@ -302,7 +302,7 @@
 	if (ipcomp6_scratch_users++)
 		return ipcomp6_scratches;
 
-	scratches = alloc_percpu(void *);
+	scratches = alloc_percpu(void *, GFP_KERNEL);
 	if (!scratches)
 		return NULL;
 
@@ -376,7 +376,7 @@
 	INIT_LIST_HEAD(&pos->list);
 	list_add(&pos->list, &ipcomp6_tfms_list);
 
-	pos->tfms = tfms = alloc_percpu(struct crypto_tfm *);
+	pos->tfms = tfms = alloc_percpu(struct crypto_tfm *, GFP_KERNEL);
 	if (!tfms)
 		goto error;
 
Index: alloc_percpu-2.6.13-rc6/net/sctp/protocol.c
===================================================================
--- alloc_percpu-2.6.13-rc6.orig/net/sctp/protocol.c	2005-08-15 15:26:40.987597250 -0400
+++ alloc_percpu-2.6.13-rc6/net/sctp/protocol.c	2005-08-15 15:27:07.157232750 -0400
@@ -939,10 +939,10 @@
 
 static int __init init_sctp_mibs(void)
 {
-	sctp_statistics[0] = alloc_percpu(struct sctp_mib);
+	sctp_statistics[0] = alloc_percpu(struct sctp_mib, GFP_KERNEL);
 	if (!sctp_statistics[0])
 		return -ENOMEM;
-	sctp_statistics[1] = alloc_percpu(struct sctp_mib);
+	sctp_statistics[1] = alloc_percpu(struct sctp_mib, GFP_KERNEL);
 	if (!sctp_statistics[1]) {
 		free_percpu(sctp_statistics[0]);
 		return -ENOMEM;

  parent reply	other threads:[~2005-09-13 16:00 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-09-13 15:51 [patch 0/11] mm: Reimplementation of dynamic per-cpu allocator Ravikiran G Thirumalai
2005-09-13 15:54 ` [patch 1/11] mm: Reimplementation of dynamic per-cpu allocator -- vmalloc_fixup Ravikiran G Thirumalai
2005-09-13 19:25   ` Andrew Morton
2005-09-13 15:56 ` [patch 2/11] mm: Reimplementation of dynamic per-cpu allocator -- alloc_percpu Ravikiran G Thirumalai
2005-09-13 15:58 ` [patch 3/11] mm: Reimplementation of dynamic per-cpu allocator -- alloc_percpu_atomic Ravikiran G Thirumalai
2005-09-13 15:59 ` Ravikiran G Thirumalai [this message]
2005-09-13 16:01 ` [patch 5/11] mm: Bigrefs -- add_getcpuptr Ravikiran G Thirumalai
2005-09-13 16:04 ` [patch 6/11] mm: Bigrefs -- distributed refcounters Ravikiran G Thirumalai
2005-09-14  7:36   ` Rusty Russell
2005-09-14 20:03     ` Ravikiran G Thirumalai
2005-09-13 16:10 ` [patch 7/11] net: Use bigrefs for net_device.refcount Ravikiran G Thirumalai
2005-09-13 16:26   ` Stephen Hemminger
2005-09-13 16:35     ` Ben Greear
2005-09-13 16:46       ` Stephen Hemminger
2005-09-13 20:26     ` David S. Miller
2005-09-13 22:16       ` Ravikiran G Thirumalai
2005-09-13 18:27   ` Eric Dumazet
2005-09-13 18:53     ` Ravikiran G Thirumalai
2005-09-13 16:12 ` [patch 8/11] net: dst_abstraction macros Ravikiran G Thirumalai
2005-09-13 16:17 ` [patch 9/11] net: dst_entry.refcount, use, lastuse to use alloc_percpu Ravikiran G Thirumalai
2005-09-13 20:24   ` David S. Miller
2005-09-13 22:07     ` Ravikiran G Thirumalai
2005-09-13 22:12       ` David S. Miller
2005-09-13 23:17         ` Ravikiran G Thirumalai
2005-09-13 23:27           ` David S. Miller
2005-09-14  7:21             ` Rusty Russell
2005-09-13 16:18 ` [patch 10/11] mm: Reimplementation of dynamic per-cpu allocator -- allow_early_mapvmarea Ravikiran G Thirumalai
2005-09-13 16:19 ` [patch 11/11] mm: Reimplementation of dynamic per-cpu allocator -- hotplug_alloc_percpu_blocks Ravikiran G Thirumalai

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=20050913155951.GF3570@localhost.localdomain \
    --to=kiran@scalex86.org \
    --cc=akpm@osdl.org \
    --cc=bharata@in.ibm.com \
    --cc=dipankar@in.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rusty@rustcorp.com.au \
    --cc=shai@scalex86.org \
    /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
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.