linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Mel Gorman <mel@csn.ul.ie>
To: Zhu Yi <yi.zhu@intel.com>
Cc: Andrew Morton <akpm@linux-foundation.org>,
	Johannes Weiner <hannes@cmpxchg.org>,
	Pekka Enberg <penberg@cs.helsinki.fi>,
	"Rafael J. Wysocki" <rjw@sisk.pl>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Kernel Testers List <kernel-testers@vger.kernel.org>,
	Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>,
	Mel Gorman <mel@skynet.ie>,
	"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
	"linux-mm@kvack.org" <linux-mm@kvack.org>,
	James Ketrenos <jketreno@linux.intel.com>,
	"Chatre, Reinette" <reinette.chatre@intel.com>,
	"linux-wireless@vger.kernel.org" <linux-wireless@vger.kernel.org>,
	"ipw2100-devel@lists.sourceforge.net"
	<ipw2100-devel@lists.sourceforge.net>
Subject: Re: [Bug #14016] mm/ipw2200 regression
Date: Thu, 27 Aug 2009 10:45:39 +0100	[thread overview]
Message-ID: <20090827094539.GA21183@csn.ul.ie> (raw)
In-Reply-To: <1251364289.3704.176.camel@debian>

On Thu, Aug 27, 2009 at 05:11:29PM +0800, Zhu Yi wrote:
> On Wed, 2009-08-26 at 22:44 +0800, Andrew Morton wrote:
> > 
> > It is perhaps pretty simple to make the second (GFP_ATOMIC) allocation
> > go away.  The code is already conveniently structured to do this:
> > 
> >         do {
> >                 chunk = (struct fw_chunk *)(data + offset);
> >                 offset += sizeof(struct fw_chunk);
> >                 /* build DMA packet and queue up for sending */
> >                 /* dma to chunk->address, the chunk->length bytes from
> > data +
> >                  * offeset*/
> >                 /* Dma loading */
> >                 rc = ipw_fw_dma_add_buffer(priv, shared_phys + offset,
> > 
> > le32_to_cpu(chunk->address),
> > 
> > le32_to_cpu(chunk->length));
> >                 if (rc) {
> >                         IPW_DEBUG_INFO("dmaAddBuffer Failed\n");
> >                         goto out;
> >                 }
> > 
> >                 offset += le32_to_cpu(chunk->length);
> >         } while (offset < len);
> > 
> > what is the typical/expected value of chunk->length here?  If it's
> > significantly less than 4096*(2^6), could we convert this function to
> > use a separate DMAable allocation per fw_chunk?
> 
> Unfortunately, the largest chunk size for the latest 3.1 firmware is
> 0x20040, which also requires order 6 page allocation. I'll try to use
> the firmware DMA command block (64 slots) to handle the image (each for
> 4k, totally 256k).
> 

That would be preferable as trying to make alloc-6 atomic allocations isn't
going to pan out. As I noted, doing it as GFP_KERNEL is possible but it'll
manifest as weird stalls periodically when the driver is loaded due to
reclaim and if the system is swapless, it might not work at all if memory
is mostly anonymous.

If the DMA command block doesn't work out, what is the feasibility of holding
onto the order-6 allocation once the module is loaded instead of allocing
for the duration of the firmware loading and then freeing it again?

-- 
Mel Gorman
Part-time Phd Student                          Linux Technology Center
University of Limerick                         IBM Dublin Software Lab

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

  reply	other threads:[~2009-08-27  9:45 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <riPp5fx5ECC.A.2IG.qsGlKB@chimera>
     [not found] ` <_yaHeGjHEzG.A.FIH.7sGlKB@chimera>
2009-08-26  6:09   ` [Bug #14016] mm/ipw2200 regression Pekka Enberg
2009-08-26  8:27     ` Johannes Weiner
2009-08-26  9:37       ` Mel Gorman
2009-08-26 14:44         ` Andrew Morton
2009-08-27  9:11           ` Zhu Yi
2009-08-27  9:45             ` Mel Gorman [this message]
2009-08-28  3:42           ` ipw2200: firmware DMA loading rework Zhu Yi
2009-08-30 12:37             ` Bartlomiej Zolnierkiewicz
2009-09-02 17:48               ` Bartlomiej Zolnierkiewicz
2009-09-02 18:02                 ` Luis R. Rodriguez
2009-09-02 18:26                   ` Bartlomiej Zolnierkiewicz
2009-09-19 13:25                     ` Bartlomiej Zolnierkiewicz
2009-09-21  8:58                       ` Mel Gorman
2009-09-21  9:59                         ` Bartlomiej Zolnierkiewicz
2009-09-21 10:08                           ` Mel Gorman
2009-09-21 10:46                             ` Bartlomiej Zolnierkiewicz
2009-09-21 10:56                               ` Pekka Enberg
2009-09-21 13:12                                 ` Bartlomiej Zolnierkiewicz
2009-09-21 13:37                                   ` Mel Gorman
2009-09-21 11:02                               ` Mel Gorman
2009-09-03 12:49                   ` Mel Gorman
2009-09-05 14:28                     ` Theodore Tso
2009-09-08 11:00                       ` Mel Gorman
2009-09-08 20:39                         ` Simon Kitching
2009-08-26  9:51       ` [Bug #14016] mm/ipw2200 regression Johannes Weiner

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=20090827094539.GA21183@csn.ul.ie \
    --to=mel@csn.ul.ie \
    --cc=akpm@linux-foundation.org \
    --cc=bzolnier@gmail.com \
    --cc=hannes@cmpxchg.org \
    --cc=ipw2100-devel@lists.sourceforge.net \
    --cc=jketreno@linux.intel.com \
    --cc=kernel-testers@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=mel@skynet.ie \
    --cc=netdev@vger.kernel.org \
    --cc=penberg@cs.helsinki.fi \
    --cc=reinette.chatre@intel.com \
    --cc=rjw@sisk.pl \
    --cc=yi.zhu@intel.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).