From: "Robert P. J. Day" <rpjday@mindspring.com>
To: psr <pradeep.rautela@gmail.com>
Cc: Shani Moideen <shani.moideen@wipro.com>,
netdev@vger.kernel.org, akpm@linux-foundation.org,
jgarzik@pobox.com, kernel-janitors@lists.osdl.org
Subject: Re: [KJ] [KJ PATCH] Replacing alloc_pages(gfp, 0) with alloc_page(gfp) in net/core/pktgen.c
Date: Wed, 13 Jun 2007 09:14:55 -0400 (EDT) [thread overview]
Message-ID: <Pine.LNX.4.64.0706130912080.4392@localhost.localdomain> (raw)
In-Reply-To: <a901b49a0706130312mba8a686m455b5cbf774cc159@mail.gmail.com>
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
========================================================================
next prev parent reply other threads:[~2007-06-13 13:17 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
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 [this message]
2007-06-13 14:28 ` psr
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=Pine.LNX.4.64.0706130912080.4392@localhost.localdomain \
--to=rpjday@mindspring.com \
--cc=akpm@linux-foundation.org \
--cc=jgarzik@pobox.com \
--cc=kernel-janitors@lists.osdl.org \
--cc=netdev@vger.kernel.org \
--cc=pradeep.rautela@gmail.com \
--cc=shani.moideen@wipro.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox