[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1213278884.3936.15.camel@johannes.berg>
Date: Thu, 12 Jun 2008 15:54:44 +0200
From: Johannes Berg <johannes@...solutions.net>
To: Rik van Riel <riel@...hat.com>
Cc: Zdenek Kabelac <zdenek.kabelac@...il.com>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
yi.zhu@...el.com, reinette.chatre@...el.com,
linux-wireless@...r.kernel.org
Subject: Re: Problem: Out of memory after 2days with 2GB RAM
On Thu, 2008-06-12 at 09:38 -0400, Rik van Riel wrote:
> On Thu, 12 Jun 2008 12:07:34 +0200
> "Zdenek Kabelac" <zdenek.kabelac@...il.com> wrote:
>
> > It looks like while there was a huge amount of buffers and caches -
> > system was unable to allocate few pages for kmalloc in iwl3945 driver
> > after resume.
>
> It looks like this is because it wants to allocate 2**5 contiguous
> pages, which is 128kB of contiguous kernel memory.
64-bit system I assume?
The allocation should be 256 * 20 * sizeof(struct sk_buff *).
Try the patch below. It should improve code generation too.
I discussed this with Tomas previously and he says the hw is capable of
doing 20 fragments per frame (wonder why, Broadcom can do an unlimited
number...) but he complained about the networking stack not being able
to. Well, the hardware needs to support IP checksumming for that, hence,
afaik, only two fragments can ever be used (one for hw header, one for
frame)
This cuts the allocation to 10%, or (under) a page in all cases.
johannes
--- everything.orig/drivers/net/wireless/iwlwifi/iwl-3945.h 2008-06-12 15:50:29.000000000 +0200
+++ everything/drivers/net/wireless/iwlwifi/iwl-3945.h 2008-06-12 15:50:31.000000000 +0200
@@ -120,7 +120,7 @@ struct iwl3945_queue {
int iwl3945_queue_space(const struct iwl3945_queue *q);
int iwl3945_x2_queue_used(const struct iwl3945_queue *q, int i);
-#define MAX_NUM_OF_TBS (20)
+#define MAX_NUM_OF_TBS (2)
/* One for each TFD */
struct iwl3945_tx_info {
--- everything.orig/drivers/net/wireless/iwlwifi/iwl-dev.h 2008-06-12 15:50:18.000000000 +0200
+++ everything/drivers/net/wireless/iwlwifi/iwl-dev.h 2008-06-12 15:50:24.000000000 +0200
@@ -115,7 +115,7 @@ struct iwl_queue {
* space less than this */
} __attribute__ ((packed));
-#define MAX_NUM_OF_TBS (20)
+#define MAX_NUM_OF_TBS (2)
/* One for each TFD */
struct iwl_tx_info {
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists