From: Samium Gromoff <_deepfire@mail.ru>
To: alan@lxorguk.ukuu.org.uk (Alan Cox)
Cc: linux-kernel@vger.kernel.org
Subject: Re: Recent kernels sound crash solution found?
Date: Fri, 7 Sep 2001 20:09:01 +0000 (UTC) [thread overview]
Message-ID: <200109072009.f87K92G06330@vegae.deep.net> (raw)
In-Reply-To: <E15fNMa-0001qL-00@the-village.bc.nu> from "Alan Cox" at Sep 07, 2001 04:16:12 PM
" Alan Cox wrote:"
>
> > * comment to point 2: very rare circumcistances includes
> > that some time should pass to fragment memory
>
> The alloc_dmap code returns -ENOMEM when the allocation fails. That causes
> the open_dmap call to return -ENOMEM which in turn causes DMAbuf_open
> to return -ENOMEM which causes audio_openb to return -ENOMEM, which gets
> back to userspace.
>
> I don't see a problem.
>
> [sound btw also supports a module option to keep the dmabuffers allocated
> once and hang onto them]
>
Alan, actually i wanted to tell you about other place:
from dmabuf.c:
/*
* Now loop until we get a free buffer. Try to get smaller buffer if
* it fails. Don't accept smaller than 8k buffer for performance
* reasons.
*/
===> _here_ is a dead-loop <===
while (start_addr == NULL && dmap->buffsize > PAGE_SIZE) {
for (sz = 0, size = PAGE_SIZE; size < dmap->buffsize; sz++, size dmap->buffsize = PAGE_SIZE * (1 << sz);
start_addr = (char *) __get_free_pages(GFP_ATOMIC|GFP_DMA, sz);
if (start_addr == NULL)
dmap->buffsize /= 2;
}
Solutions:
1. make it accept 0-order allocations
2. make CONFIG_SOUND_DMAP not a config, but the only option
cheers, Sam
next prev parent reply other threads:[~2001-09-07 15:46 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-09-07 19:26 Samium Gromoff
2001-09-07 15:16 ` Alan Cox
2001-09-07 20:09 ` Samium Gromoff [this message]
2001-09-07 15:54 ` Alan Cox
2001-09-07 20:16 ` Samium Gromoff
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=200109072009.f87K92G06330@vegae.deep.net \
--to=_deepfire@mail.ru \
--cc=alan@lxorguk.ukuu.org.uk \
--cc=linux-kernel@vger.kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®