Re: Problem: Out of memory after 2days with 2GB RAM

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Johannes Berg
Date: Thursday, June 12, 2008 - 6:54 am

On Thu, 2008-06-12 at 09:38 -0400, Rik van Riel wrote:

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 {


--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Problem: Out of memory after 2days with 2GB RAM, Zdenek Kabelac, (Thu Jun 12, 3:07 am)
Re: Problem: Out of memory after 2days with 2GB RAM, Rik van Riel, (Thu Jun 12, 6:38 am)
Re: Problem: Out of memory after 2days with 2GB RAM, Johannes Berg, (Thu Jun 12, 6:54 am)
Re: Problem: Out of memory after 2days with 2GB RAM, Zdenek Kabelac, (Thu Jun 12, 7:12 am)
Re: Problem: Out of memory after 2days with 2GB RAM, Johannes Berg, (Thu Jun 12, 7:19 am)
Re: Problem: Out of memory after 2days with 2GB RAM, Tomas Winkler, (Thu Jun 12, 8:43 am)
Re: Problem: Out of memory after 2days with 2GB RAM, Tomas Winkler, (Thu Jun 12, 9:35 am)
Re: Problem: Out of memory after 2days with 2GB RAM, Tomas Winkler, (Thu Jun 12, 9:38 am)
Re: Problem: Out of memory after 2days with 2GB RAM, Johannes Berg, (Thu Jun 12, 10:03 am)
Re: Problem: Out of memory after 2days with 2GB RAM, Johannes Berg, (Thu Jun 12, 10:05 am)
Re: Problem: Out of memory after 2days with 2GB RAM, Rik van Riel, (Thu Jun 12, 10:10 am)
Re: Problem: Out of memory after 2days with 2GB RAM, Tomas Winkler, (Thu Jun 12, 10:35 am)
Re: Problem: Out of memory after 2days with 2GB RAM, Johannes Berg, (Thu Jun 12, 10:39 am)
Re: Problem: Out of memory after 2days with 2GB RAM, Tomas Winkler, (Thu Jun 12, 10:39 am)
Re: Problem: Out of memory after 2days with 2GB RAM, Johannes Berg, (Thu Jun 12, 10:46 am)
Re: Problem: Out of memory after 2days with 2GB RAM, Tomas Winkler, (Thu Jun 12, 10:50 am)
Re: Problem: Out of memory after 2days with 2GB RAM, Tomas Winkler, (Thu Jun 12, 11:03 am)
Re: Problem: Out of memory after 2days with 2GB RAM, Johannes Berg, (Thu Jun 12, 11:15 am)
Re: Problem: Out of memory after 2days with 2GB RAM, John W. Linville, (Thu Jun 12, 11:41 am)
Re: Problem: Out of memory after 2days with 2GB RAM, Zdenek Kabelac, (Thu Jun 12, 1:11 pm)
Re: Problem: Out of memory after 2days with 2GB RAM, Jiri Slaby, (Thu Jun 12, 2:30 pm)
Re: Problem: Out of memory after 2days with 2GB RAM, Tomas Winkler, (Thu Jun 12, 3:17 pm)
Re: Problem: Out of memory after 2days with 2GB RAM, Tomas Winkler, (Thu Jun 12, 3:26 pm)
Re: Problem: Out of memory after 2days with 2GB RAM, Andrew Morton, (Thu Jun 12, 5:43 pm)
Re: Problem: Out of memory after 2days with 2GB RAM, Rafael J. Wysocki, (Fri Jun 13, 7:08 am)
Re: Problem: Out of memory after 2days with 2GB RAM, Zdenek Kabelac, (Fri Jun 13, 7:15 am)
Re: Problem: Out of memory after 2days with 2GB RAM, Zdenek Kabelac, (Mon Jun 30, 4:30 am)