From: Evgeniy Polyakov <johnpol@2ka.mipt.ru>
To: Christoph Hellwig <hch@infradead.org>
Cc: David Miller <davem@davemloft.net>,
netdev@vger.kernel.org, sfr@canb.auug.org.au,
shemminger@linux-foundation.org
Subject: Re: [PATCH]: Fix sk_buff page offsets and lengths.
Date: Tue, 31 Jul 2007 18:00:55 +0400 [thread overview]
Message-ID: <20070731140054.GA11442@2ka.mipt.ru> (raw)
In-Reply-To: <20070731122329.GB11380@infradead.org>
On Tue, Jul 31, 2007 at 01:23:29PM +0100, Christoph Hellwig (hch@infradead.org) wrote:
> On Tue, Jul 31, 2007 at 02:20:51PM +0400, Evgeniy Polyakov wrote:
> > On Mon, Jul 30, 2007 at 06:50:28PM -0700, David Miller (davem@davemloft.net) wrote:
> > >
> > > Stephen Rothwell pointed out to me that the skb_frag_struct
> > > is broken on platforms using 64K or larger page sizes, it
> > > even generates warnings when (for example) the myri10ge driver
> > > tries to assign PAGE_SIZE into frag->size.
> > >
> > > I've thus increased page offset and size to __u32 in the patch below.
> >
> > Maybe wrap it into
> > #if PAGE_OFFSET > 12
> > #endif
> >
> > or something like that?
> >
> > I'm not sure actually why drivers would want to have list of 64k pages,
> > instead driver could call give_me_pages(size) instead of alloc_pages
> > and per-arch allocator would return one page or set of pages. This is a
> > handwaving for now...
>
> What about sendfile/splice on hugetlbfs?
offset in tcp_sendpage() ends up being poffset % PAGE_SIZE,
page is
struct page *page = pages[poffset / PAGE_SIZE];
So, as far as I understand, it will split bigpage into PAGE_SIZEd
chunks.
--
Evgeniy Polyakov
prev parent reply other threads:[~2007-07-31 14:01 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-07-31 1:50 [PATCH]: Fix sk_buff page offsets and lengths David Miller
2007-07-31 8:52 ` Eric Dumazet
2007-08-01 20:44 ` David Miller
2007-07-31 10:20 ` Evgeniy Polyakov
2007-07-31 12:23 ` Christoph Hellwig
2007-07-31 14:00 ` Evgeniy Polyakov [this message]
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=20070731140054.GA11442@2ka.mipt.ru \
--to=johnpol@2ka.mipt.ru \
--cc=davem@davemloft.net \
--cc=hch@infradead.org \
--cc=netdev@vger.kernel.org \
--cc=sfr@canb.auug.org.au \
--cc=shemminger@linux-foundation.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).