From: Evgeniy Polyakov <johnpol@2ka.mipt.ru>
To: Arjan van de Ven <arjan@linux.intel.com>
Cc: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
Linus Torvalds <torvalds@linux-foundation.org>,
NetDev <netdev@vger.kernel.org>,
Andrew Morton <akpm@linux-foundation.org>,
Jeff Garzik <jgarzik@pobox.com>,
Francois Romieu <romieu@fr.zoreil.com>
Subject: Re: Top kernel oopses/warnings for the week of May 16th 2008
Date: Fri, 16 May 2008 21:14:07 +0400 [thread overview]
Message-ID: <20080516171407.GA1694@2ka.mipt.ru> (raw)
In-Reply-To: <482DB93B.2080100@linux.intel.com>
On Fri, May 16, 2008 at 09:41:31AM -0700, Arjan van de Ven (arjan@linux.intel.com) wrote:
> Rank 10: __alloc_pages
> Reported 16 times (31 total reports)
> Sleeping allocation in interrupt context, some in netlink, some in
> the nv sata driver
> This oops was last seen in version 2.6.25.3, and first seen in
> 2.6.18-rc1.
> More info:
> http://www.kerneloops.org/searchweek.php?search=__alloc_pages
Number of them from via-velocity driver should be fixed by attached
patch (added Francois Romieu <romieu@fr.zoreil.com> to copy), but
frankly that looks really bad. Allocations are protected by lock, which
is used for interrupts, but that is safe, since device is turned off,
but also for suspend (which can free them again, btw), mii register dump
(will break without lock) and something else, which should be fine
though because of rtnl. What we could do better, is to allocate new
rings in advance, and only substitue pointers and write registers under
the lock, Francois?
diff --git a/drivers/net/via-velocity.c b/drivers/net/via-velocity.c
index 6b8d882..d6b7972 100644
--- a/drivers/net/via-velocity.c
+++ b/drivers/net/via-velocity.c
@@ -1251,7 +1251,7 @@ static int velocity_init_rd_ring(struct velocity_info *vptr)
vptr->rx_buf_sz = (mtu <= ETH_DATA_LEN) ? PKT_BUF_SZ : mtu + 32;
vptr->rd_info = kcalloc(vptr->options.numrx,
- sizeof(struct velocity_rd_info), GFP_KERNEL);
+ sizeof(struct velocity_rd_info), GFP_ATOMIC);
if (!vptr->rd_info)
return -ENOMEM;
@@ -1324,7 +1324,7 @@ static int velocity_init_td_ring(struct velocity_info *vptr)
vptr->td_infos[j] = kcalloc(vptr->options.numtx,
sizeof(struct velocity_td_info),
- GFP_KERNEL);
+ GFP_ATOMIC);
if (!vptr->td_infos[j]) {
while(--j >= 0)
kfree(vptr->td_infos[j]);
--
Evgeniy Polyakov
next prev parent reply other threads:[~2008-05-16 17:24 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-05-16 16:41 Arjan van de Ven
2008-05-16 17:14 ` Evgeniy Polyakov [this message]
2008-05-16 18:04 ` Adrian Bunk
2008-05-16 18:19 ` Arjan van de Ven
2008-05-20 3:53 ` Dave Jones
2008-05-16 18:50 ` notification for systemtap-related oops Frank Ch. Eigler
2008-05-16 19:47 ` Arjan van de Ven
2008-05-16 20:23 ` Frank Ch. Eigler
[not found] <fa.LFS/TATb5YijFetLw6A+gczrVAQ@ifi.uio.no>
2008-05-17 1:55 ` Top kernel oopses/warnings for the week of May 16th 2008 Robert Hancock
2008-05-17 14:12 ` Andrea Arcangeli
2008-05-17 14:57 ` Arjan van de Ven
2008-05-17 20:34 ` Andrea Arcangeli
2008-05-17 17:38 ` Robert Hancock
[not found] <fa.d+EaKQa5MirlzoI/uZKGy3xe0h0@ifi.uio.no>
[not found] ` <fa.TM0B9DZ+uvPYd9hbDhfuRgtReEk@ifi.uio.no>
[not found] ` <fa.aEHVuArwNEvL0BbdjUyZdMtgx5s@ifi.uio.no>
[not found] ` <fa.Td5KtiJWRKP94D9KrvGd+GkHdW0@ifi.uio.no>
[not found] ` <fa.wtWnOZVeQ06/16BVE5ml7FVHP+c@ifi.uio.no>
2008-05-19 2:23 ` Robert Hancock
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=20080516171407.GA1694@2ka.mipt.ru \
--to=johnpol@2ka.mipt.ru \
--cc=akpm@linux-foundation.org \
--cc=arjan@linux.intel.com \
--cc=jgarzik@pobox.com \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=romieu@fr.zoreil.com \
--cc=torvalds@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
all inboxes | Powered by JetHome®