Skip to contentSkip to conversation

Convert some GFP_ATOMIC allocations

PATCH New Julian Anastasov 1 participant 7 messages Apr 13, 2012

Subsystems (3)
lore
Share & tools
lore

Julian Anastasov

author maintainer
#0 lore raw

cover Convert some GFP_ATOMIC allocations

Convert mostly schedulers and one place for timeout table.
Only one place is left: register_ip_vs_proto_netns. I hope someone will fix it together with other changes.

Julian Anastasov (6):
ipvs: timeout tables do not need GFP_ATOMIC allocation
ipvs: SH scheduler does not need GFP_ATOMIC allocation
ipvs: DH scheduler does not need GFP_ATOMIC allocation
ipvs: LBLC scheduler does not need GFP_ATOMIC allocation on init
ipvs: LBLCR scheduler does not need GFP_ATOMIC allocation on init
ipvs: WRR scheduler does not need GFP_ATOMIC allocation

 net/netfilter/ipvs/ip_vs_dh.c    |    2 +-
 net/netfilter/ipvs/ip_vs_lblc.c  |    2 +-
 net/netfilter/ipvs/ip_vs_lblcr.c |    2 +-
 net/netfilter/ipvs/ip_vs_proto.c |    2 +-
 net/netfilter/ipvs/ip_vs_sh.c    |    2 +-
 net/netfilter/ipvs/ip_vs_wrr.c   |    2 +-
 6 files changed, 6 insertions(+), 6 deletions(-)
Signature · 1 line
1.7.3.4
author maintainer
#1 lore raw

PATCH 1/6 ipvs: timeout tables do not need GFP_ATOMIC allocation

They are called only on initialization.

---
 net/netfilter/ipvs/ip_vs_proto.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
net/netfilter/ipvs/ip_vs_proto.c +1 -1
index 8531293..f549ff7 100644
@@ -197,7 +197,7 @@ void ip_vs_protocol_timeout_change(struct netns_ipvs *ipvs, int flags)
 int *
 ip_vs_create_timeout_table(int *table, int size)
 {
-	return kmemdup(table, size, GFP_ATOMIC);
+	return kmemdup(table, size, GFP_KERNEL);
 }
 
 
Signature · 1 line
1.7.3.4
author maintainer
#2 lore raw

PATCH 2/6 ipvs: SH scheduler does not need GFP_ATOMIC allocation

In reply to Julian Anastasov

Schedulers are initialized and bound to services only
on commands.

---
 net/netfilter/ipvs/ip_vs_sh.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
net/netfilter/ipvs/ip_vs_sh.c +1 -1
index 069e8d4..47182dd 100644
@@ -162,7 +162,7 @@ static int ip_vs_sh_init_svc(struct ip_vs_service *svc)
 
 	/* allocate the SH table for this service */
 	tbl = kmalloc(sizeof(struct ip_vs_sh_bucket)*IP_VS_SH_TAB_SIZE,
-		      GFP_ATOMIC);
+		      GFP_KERNEL);
 	if (tbl == NULL)
 		return -ENOMEM;
 
Signature · 1 line
1.7.3.4
author maintainer
#3 lore raw

PATCH 3/6 ipvs: DH scheduler does not need GFP_ATOMIC allocation

In reply to Julian Anastasov

Schedulers are initialized and bound to services only
on commands.

---
 net/netfilter/ipvs/ip_vs_dh.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
net/netfilter/ipvs/ip_vs_dh.c +1 -1
index 1c269e5..127ecb3 100644
@@ -149,7 +149,7 @@ static int ip_vs_dh_init_svc(struct ip_vs_service *svc)
 
 	/* allocate the DH table for this service */
 	tbl = kmalloc(sizeof(struct ip_vs_dh_bucket)*IP_VS_DH_TAB_SIZE,
-		      GFP_ATOMIC);
+		      GFP_KERNEL);
 	if (tbl == NULL)
 		return -ENOMEM;
 
Signature · 1 line
1.7.3.4
author maintainer
#4 lore raw

PATCH 4/6 ipvs: LBLC scheduler does not need GFP_ATOMIC allocation on init

In reply to Julian Anastasov

Schedulers are initialized and bound to services only
on commands.

---
 net/netfilter/ipvs/ip_vs_lblc.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
net/netfilter/ipvs/ip_vs_lblc.c +1 -1
index 0f16283..26e6ba5 100644
@@ -342,7 +342,7 @@ static int ip_vs_lblc_init_svc(struct ip_vs_service *svc)
 	/*
 	 *    Allocate the ip_vs_lblc_table for this service
 	 */
-	tbl = kmalloc(sizeof(*tbl), GFP_ATOMIC);
+	tbl = kmalloc(sizeof(*tbl), GFP_KERNEL);
 	if (tbl == NULL)
 		return -ENOMEM;
 
Signature · 1 line
1.7.3.4
author maintainer
#5 lore raw

PATCH 5/6 ipvs: LBLCR scheduler does not need GFP_ATOMIC allocation on init

In reply to Julian Anastasov

Schedulers are initialized and bound to services only
on commands.

---
 net/netfilter/ipvs/ip_vs_lblcr.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
net/netfilter/ipvs/ip_vs_lblcr.c +1 -1
index eec797f..adecc83 100644
@@ -511,7 +511,7 @@ static int ip_vs_lblcr_init_svc(struct ip_vs_service *svc)
 	/*
 	 *    Allocate the ip_vs_lblcr_table for this service
 	 */
-	tbl = kmalloc(sizeof(*tbl), GFP_ATOMIC);
+	tbl = kmalloc(sizeof(*tbl), GFP_KERNEL);
 	if (tbl == NULL)
 		return -ENOMEM;
 
Signature · 1 line
1.7.3.4
author maintainer
#6 lore raw

PATCH 6/6 ipvs: WRR scheduler does not need GFP_ATOMIC allocation

In reply to Julian Anastasov

Schedulers are initialized and bound to services only
on commands.

---
 net/netfilter/ipvs/ip_vs_wrr.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
net/netfilter/ipvs/ip_vs_wrr.c +1 -1
index fd0d4e0..231be7d 100644
@@ -84,7 +84,7 @@ static int ip_vs_wrr_init_svc(struct ip_vs_service *svc)
 	/*
 	 *    Allocate the mark variable for WRR scheduling
 	 */
-	mark = kmalloc(sizeof(struct ip_vs_wrr_mark), GFP_ATOMIC);
+	mark = kmalloc(sizeof(struct ip_vs_wrr_mark), GFP_KERNEL);
 	if (mark == NULL)
 		return -ENOMEM;
 
Signature · 1 line
1.7.3.4