From: Arnaldo Carvalho de Melo <acme@conectiva.com.br>
To: "Jens Hoffrichter" <HOFFRICH@de.ibm.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re: Allocation of sk_buffs in the kernel
Date: Thu, 23 Aug 2001 06:12:06 -0300 [thread overview]
Message-ID: <20010823061206.U5062@conectiva.com.br> (raw)
In-Reply-To: <OF451110AC.14EEC1A3-ONC1256AB1.0030B2FB@de.ibm.com>
In-Reply-To: <OF451110AC.14EEC1A3-ONC1256AB1.0030B2FB@de.ibm.com>; from HOFFRICH@de.ibm.com on Thu, Aug 23, 2001 at 11:01:42AM +0200
Em Thu, Aug 23, 2001 at 11:01:42AM +0200, Jens Hoffrichter escreveu:
> Hi,
>
> > Maybe Jens should use something like WAITQUEUE_DEBUG if he want to know
> > where alloc_skb and friends were called, see include/linux/wait.h 8)
> Do you mean I should use something LIKE the WAITQUEUE_DEBUG (eg.
> implementing something like that in skbuff.c) or I should use
> WAITQUEUE_DEBUG?
no, just use the same idea that is used to debug wait_queues
> The code in wait.h mainly seems to consist of issuing BUG() calls, and
> thats not quite what I want to ;) But how is it to use? I don't know much
> about waitqueues in the Linux kernel, I mainly played with the network
> stack...
heh, thats my use for the waitqueue debug now 8)
> Are there any examples how to use the WAITQUEUE_DEBUG?
oops, I mean the __waker thing, for debugging you could get the address of
the caller with current_text_addr() and store it in an extra sk_buff field
so that later on you could know who create the skb.
About the example of WAITQUEUE_DEBUG:
after being awaken you could do this:
dprintk("sleeper=%p, waker=%lx\n",
current_text_addr(), wait.__waker);
in a inline function does the trick, but this is just an example of a
function that uses an extra debug field in a structure that is alocated
somewhere and you want to know who allocated it later on.
Yes, you'll have to decode the address from syslog, gotcha?
- Arnaldo
next prev parent reply other threads:[~2001-08-23 9:12 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-08-23 9:01 Allocation of sk_buffs in the kernel Jens Hoffrichter
2001-08-23 9:12 ` Arnaldo Carvalho de Melo [this message]
-- strict thread matches above, loose matches on Subject: below --
2001-08-23 9:29 Jens Hoffrichter
2001-08-23 9:46 ` Arnaldo Carvalho de Melo
2001-08-23 9:07 Jens Hoffrichter
[not found] <OF55D2E221.5E62CB41-ONC1256AB0.0052D2D3@de.ibm.com.suse.lists.linux.kernel>
2001-08-23 3:14 ` Andi Kleen
2001-08-23 3:42 ` Arnaldo Carvalho de Melo
2001-08-22 15:10 Jens Hoffrichter
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=20010823061206.U5062@conectiva.com.br \
--to=acme@conectiva.com.br \
--cc=HOFFRICH@de.ibm.com \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.