* [KJ PATCH] Replacing alloc_pages(gfp,0) with alloc_page(gfp) in net/core/pktgen.c
@ 2007-06-13 2:42 Shani Moideen
2007-06-13 10:12 ` [KJ] [KJ PATCH] Replacing alloc_pages(gfp, 0) " psr
0 siblings, 1 reply; 4+ messages in thread
From: Shani Moideen @ 2007-06-13 2:42 UTC (permalink / raw)
To: jgarzik, akpm; +Cc: netdev, kernel-janitors
Replacing alloc_pages(gfp,0) with alloc_page(gfp)
in net/core/pktgen.c
Signed-off-by: Shani Moideen <shani.moideen@wipro.com>
----
diff --git a/net/core/pktgen.c b/net/core/pktgen.c
index b92a322..2600c7f 100644
--- a/net/core/pktgen.c
+++ b/net/core/pktgen.c
@@ -2414,7 +2414,7 @@ static struct sk_buff *fill_packet_ipv4(struct net_device *odev,
i = 0;
while (datalen > 0) {
- struct page *page = alloc_pages(GFP_KERNEL, 0);
+ struct page *page = alloc_page(GFP_KERNEL);
skb_shinfo(skb)->frags[i].page = page;
skb_shinfo(skb)->frags[i].page_offset = 0;
skb_shinfo(skb)->frags[i].size =
@@ -2762,7 +2762,7 @@ static struct sk_buff *fill_packet_ipv6(struct net_device *odev,
i = 0;
while (datalen > 0) {
- struct page *page = alloc_pages(GFP_KERNEL, 0);
+ struct page *page = alloc_page(GFP_KERNEL);
skb_shinfo(skb)->frags[i].page = page;
skb_shinfo(skb)->frags[i].page_offset = 0;
skb_shinfo(skb)->frags[i].size =
--
Shani
^ permalink raw reply related [flat|nested] 4+ messages in thread* Re: [KJ] [KJ PATCH] Replacing alloc_pages(gfp, 0) with alloc_page(gfp) in net/core/pktgen.c
2007-06-13 2:42 [KJ PATCH] Replacing alloc_pages(gfp,0) with alloc_page(gfp) in net/core/pktgen.c Shani Moideen
@ 2007-06-13 10:12 ` psr
2007-06-13 13:14 ` Robert P. J. Day
0 siblings, 1 reply; 4+ messages in thread
From: psr @ 2007-06-13 10:12 UTC (permalink / raw)
To: Shani Moideen; +Cc: jgarzik, akpm, netdev, kernel-janitors
On 6/13/07, Shani Moideen <shani.moideen@wipro.com> wrote:
>
> Replacing alloc_pages(gfp,0) with alloc_page(gfp)
> in net/core/pktgen.c
>
> Signed-off-by: Shani Moideen <shani.moideen@wipro.com>
> ----
>
> diff --git a/net/core/pktgen.c b/net/core/pktgen.c
> index b92a322..2600c7f 100644
> --- a/net/core/pktgen.c
> +++ b/net/core/pktgen.c
> @@ -2414,7 +2414,7 @@ static struct sk_buff *fill_packet_ipv4(struct net_device *odev,
>
> i = 0;
> while (datalen > 0) {
> - struct page *page = alloc_pages(GFP_KERNEL, 0);
> + struct page *page = alloc_page(GFP_KERNEL);
Does this makes any difference anyway? Both are same eventually?
What is the rational behind this? Can you please help me understanding this?
thanks
--pradeep
> skb_shinfo(skb)->frags[i].page = page;
> skb_shinfo(skb)->frags[i].page_offset = 0;
> skb_shinfo(skb)->frags[i].size =
> @@ -2762,7 +2762,7 @@ static struct sk_buff *fill_packet_ipv6(struct net_device *odev,
>
> i = 0;
> while (datalen > 0) {
> - struct page *page = alloc_pages(GFP_KERNEL, 0);
> + struct page *page = alloc_page(GFP_KERNEL);
> skb_shinfo(skb)->frags[i].page = page;
> skb_shinfo(skb)->frags[i].page_offset = 0;
> skb_shinfo(skb)->frags[i].size =
>
> --
> Shani
> _______________________________________________
> Kernel-janitors mailing list
> Kernel-janitors@lists.linux-foundation.org
> https://lists.linux-foundation.org/mailman/listinfo/kernel-janitors
>
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: [KJ] [KJ PATCH] Replacing alloc_pages(gfp, 0) with alloc_page(gfp) in net/core/pktgen.c
2007-06-13 10:12 ` [KJ] [KJ PATCH] Replacing alloc_pages(gfp, 0) " psr
@ 2007-06-13 13:14 ` Robert P. J. Day
2007-06-13 14:28 ` psr
0 siblings, 1 reply; 4+ messages in thread
From: Robert P. J. Day @ 2007-06-13 13:14 UTC (permalink / raw)
To: psr; +Cc: Shani Moideen, netdev, akpm, jgarzik, kernel-janitors
On Wed, 13 Jun 2007, psr wrote:
> On 6/13/07, Shani Moideen <shani.moideen@wipro.com> wrote:
> >
> > Replacing alloc_pages(gfp,0) with alloc_page(gfp)
> > in net/core/pktgen.c
> >
> > Signed-off-by: Shani Moideen <shani.moideen@wipro.com>
> > ----
> >
> > diff --git a/net/core/pktgen.c b/net/core/pktgen.c
> > index b92a322..2600c7f 100644
> > --- a/net/core/pktgen.c
> > +++ b/net/core/pktgen.c
> > @@ -2414,7 +2414,7 @@ static struct sk_buff *fill_packet_ipv4(struct
> > net_device *odev,
> >
> > i = 0;
> > while (datalen > 0) {
> > - struct page *page = alloc_pages(GFP_KERNEL, 0);
> > + struct page *page = alloc_page(GFP_KERNEL);
>
> Does this makes any difference anyway? Both are same eventually?
> What is the rational behind this? Can you please help me
> understanding this?
since this is one of the TO DO items i added to the list of things at
the wiki:
http://fsdev.net/wiki/index.php?title=Memory_allocation_cleanup
i'll just toss in my $0.02. if a short (more convenient) form of a
routine has been defined, it should be used. if you have no plans to
use it, it shouldn't have been defined in the first place.
in short, make a consistent decision and go with it.
rday
--
========================================================================
Robert P. J. Day
Linux Consulting, Training and Annoying Kernel Pedantry
Waterloo, Ontario, CANADA
http://fsdev.net/wiki/index.php?title=Main_Page
========================================================================
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: [KJ] [KJ PATCH] Replacing alloc_pages(gfp, 0) with alloc_page(gfp) in net/core/pktgen.c
2007-06-13 13:14 ` Robert P. J. Day
@ 2007-06-13 14:28 ` psr
0 siblings, 0 replies; 4+ messages in thread
From: psr @ 2007-06-13 14:28 UTC (permalink / raw)
To: Robert P. J. Day; +Cc: Shani Moideen, netdev, akpm, jgarzik, kernel-janitors
On 6/13/07, Robert P. J. Day <rpjday@mindspring.com> wrote:
[snip]
> >
> > Does this makes any difference anyway? Both are same eventually?
> > What is the rational behind this? Can you please help me
> > understanding this?
>
> since this is one of the TO DO items i added to the list of things at
> the wiki:
>
> http://fsdev.net/wiki/index.php?title=Memory_allocation_cleanup
>
> i'll just toss in my $0.02. if a short (more convenient) form of a
> routine has been defined, it should be used. if you have no plans to
> use it, it shouldn't have been defined in the first place.
Oh... agreed
Thanks
--pradeep
>
> in short, make a consistent decision and go with it.
>
> rday
> --
> ========================================================================
> Robert P. J. Day
> Linux Consulting, Training and Annoying Kernel Pedantry
> Waterloo, Ontario, CANADA
>
> http://fsdev.net/wiki/index.php?title=Main_Page
> ========================================================================
>
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2007-06-13 14:28 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-06-13 2:42 [KJ PATCH] Replacing alloc_pages(gfp,0) with alloc_page(gfp) in net/core/pktgen.c Shani Moideen
2007-06-13 10:12 ` [KJ] [KJ PATCH] Replacing alloc_pages(gfp, 0) " psr
2007-06-13 13:14 ` Robert P. J. Day
2007-06-13 14:28 ` psr
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox