linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Andrea Arcangeli <andrea@suse.de>
To: kuznet@ms2.inr.ac.ru
Cc: Dave Miller <davem@redhat.com>,
	Alan Cox <alan@lxorguk.ukuu.org.uk>,
	linux-kernel@vger.kernel.org
Subject: Re: alloc_skb cannot be called with GFP_DMA
Date: Sun, 5 Aug 2001 20:38:10 +0200	[thread overview]
Message-ID: <20010805203810.K21840@athlon.random> (raw)
In-Reply-To: <20010805181606.F21840@athlon.random> <200108051718.VAA17521@ms2.inr.ac.ru>
In-Reply-To: <200108051718.VAA17521@ms2.inr.ac.ru>; from kuznet@ms2.inr.ac.ru on Sun, Aug 05, 2001 at 09:18:11PM +0400

On Sun, Aug 05, 2001 at 09:18:11PM +0400, kuznet@ms2.inr.ac.ru wrote:
> Hello!
> 
> > alloc_isa_skb will avoid to slowdown alloc_skb so I prefer it compared
> > to hiding the logic inside alloc_skb.
> 
> Stop! This is redundant. GFP_DMA is for skb data, not head!
> 
> So that, it is enough and right to clear GFP_DMA inside
> alloc_skb when allocating skb head.

ah it's all metadata, so this should fix it (the bugcheck will still
trap any skb_clone caller that uses GFP_DMA because it doesn't make
sense to call skb_clone with GFP_DMA):

--- 2.4.8pre4aa1/net/core/skbuff.c.~1~	Sat Jul 21 00:04:34 2001
+++ 2.4.8pre4aa1/net/core/skbuff.c	Sun Aug  5 20:30:00 2001
@@ -180,7 +180,7 @@
 	/* Get the HEAD */
 	skb = skb_head_from_pool();
 	if (skb == NULL) {
-		skb = kmem_cache_alloc(skbuff_head_cache, gfp_mask);
+		skb = kmem_cache_alloc(skbuff_head_cache, gfp_mask & ~__GFP_DMA);
 		if (skb == NULL)
 			goto nohead;
 	}

Andrea

  reply	other threads:[~2001-08-05 18:38 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-08-05 15:53 alloc_skb cannot be called with GFP_DMA Andrea Arcangeli
2001-08-05 16:03 ` Alan Cox
2001-08-05 16:16   ` Andrea Arcangeli
2001-08-05 17:18     ` kuznet
2001-08-05 18:38       ` Andrea Arcangeli [this message]
2002-09-26 21:18 Manfred Spraul

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=20010805203810.K21840@athlon.random \
    --to=andrea@suse.de \
    --cc=alan@lxorguk.ukuu.org.uk \
    --cc=davem@redhat.com \
    --cc=kuznet@ms2.inr.ac.ru \
    --cc=linux-kernel@vger.kernel.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).