Re: dsp mmap change

From: Kostik Belousov <kostikbel_at_gmail.com>
Date: Fri, 6 May 2011 16:32:04 +0300
On Fri, May 06, 2011 at 11:55:00AM +0300, Andriy Gapon wrote:
> 
> I would like to ask for a review and/or testing of the following patch:
> http://people.freebsd.org/~avg/dev_dsp_mmap.diff
> 
> It's supposed to fix an issue described here:
> http://lists.freebsd.org/pipermail/freebsd-multimedia/2011-February/011691.html
> 
> In short, the following pseudo-code should do the right thing:
> fd = open(/dev/dsp, O_RDWR);
> mmap(PROT_READ, fd);
> mmap(PROT_WRITE, fd);
> 
> Thank you!

I think that you have to call PCM_GIANT_LEAVE() when returning
EINVAL on the vm_pager_alloc() failure.

Your patch hardcodes an assumption that sndbufs are always
contiguous. I was unable to convince myself that this is true.

Received on Fri May 06 2011 - 11:32:09 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:40:13 UTC