linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Johannes Berg <johannes@sipsolutions.net>
To: Rik van Riel <riel@redhat.com>
Cc: Zdenek Kabelac <zdenek.kabelac@gmail.com>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	yi.zhu@intel.com, reinette.chatre@intel.com,
	linux-wireless@vger.kernel.org
Subject: Re: Problem: Out of memory after 2days with 2GB RAM
Date: Thu, 12 Jun 2008 15:54:44 +0200	[thread overview]
Message-ID: <1213278884.3936.15.camel@johannes.berg> (raw)
In-Reply-To: <20080612093833.0fb9cdd6@bree.surriel.com> (sfid-20080612_154046_320899_AF22CEFB)

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@gmail.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 {



  reply	other threads:[~2008-06-12 13:55 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <c4e36d110806120307n20cce692s9c136f11596f5ab0@mail.gmail.com>
2008-06-12 13:38 ` Problem: Out of memory after 2days with 2GB RAM Rik van Riel
2008-06-12 13:54   ` Johannes Berg [this message]
2008-06-12 14:12     ` Zdenek Kabelac
2008-06-12 14:19       ` Johannes Berg
2008-06-12 16:38       ` Tomas Winkler
2008-06-12 15:43     ` Tomas Winkler
2008-06-12 16:35       ` Tomas Winkler
2008-06-12 17:05         ` Johannes Berg
2008-06-12 17:39           ` Tomas Winkler
2008-06-12 17:46             ` Johannes Berg
2008-06-12 18:03               ` Tomas Winkler
2008-06-12 18:15                 ` Johannes Berg
2008-06-12 20:11                   ` Zdenek Kabelac
2008-06-12 22:17                     ` Tomas Winkler
2008-06-13  0:43                     ` Andrew Morton
2008-06-12 18:41               ` John W. Linville
2008-06-12 17:03       ` Johannes Berg
2008-06-12 17:35         ` Tomas Winkler
2008-06-12 17:39           ` Johannes Berg
2008-06-12 17:50             ` Tomas Winkler
2008-06-12 17:10       ` Rik van Riel
2008-06-12 21:30       ` Jiri Slaby
2008-06-12 22:26         ` Tomas Winkler

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=1213278884.3936.15.camel@johannes.berg \
    --to=johannes@sipsolutions.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=reinette.chatre@intel.com \
    --cc=riel@redhat.com \
    --cc=yi.zhu@intel.com \
    --cc=zdenek.kabelac@gmail.com \
    /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).