All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jeff Garzik <jgarzik@mandrakesoft.com>
To: Pavel Roskin <proski@gnu.org>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [PATCH] More ioctls for VIA sound driver, Flash 5 now fixed
Date: Sat, 27 Oct 2001 04:08:47 -0400	[thread overview]
Message-ID: <3BDA6B8F.FDC44349@mandrakesoft.com> (raw)
In-Reply-To: <Pine.LNX.4.33.0110270256210.7888-100000@portland.hansa.lan> <3BDA6A4F.D73EC73A@mandrakesoft.com>

Jeff Garzik wrote:
> So, the preferred allocation algorithm would be:
> 
>         if (OSS fragment size <= PAGE_SIZE)
>                 allocate chan->pgtbl[] in PAGE_SIZE chunks
>         else
>                 allocate chan->pgtbl[] in oss_frag_size chunks
> 
> Another key thing to rememeber is that pci_alloc_consistent usually
> returns a -minimum- of one page, so it's useless to allocate less than
> that, without switching the entire driver to the pci_pool_xxx API.

Another limitation, I just remembered:  Each scatter-gather buffer must
be a multiple of PAGE_SIZE (actually probably PAGE_CACHE_SIZE), in order
for mmap(2) support (via_mm_nopage) to work properly.

I would also like to point out that mmap support via
vm_operations_struct::nopage is also unique and new, and was suggested
by Linus as a much better mmap(2) approach than other drivers, which
using remap_page_range [a method which requires the one-big-buffer
allocation approach].

	Jeff


-- 
Jeff Garzik      | Only so many songs can be sung
Building 1024    | with two lips, two lungs, and one tongue.
MandrakeSoft     |         - nomeansno


      reply	other threads:[~2001-10-27  8:08 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-10-27  1:49 [PATCH] More ioctls for VIA sound driver, Flash 5 now fixed Pavel Roskin
2001-10-27  6:30 ` Jeff Garzik
2001-10-27  7:32   ` Pavel Roskin
2001-10-27  8:03     ` Jeff Garzik
2001-10-27  8:08       ` Jeff Garzik [this message]

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=3BDA6B8F.FDC44349@mandrakesoft.com \
    --to=jgarzik@mandrakesoft.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=proski@gnu.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.