skypopen: tweaking the OSS audio driver, still gives a load average higher than snd-dummy + snd-pcm-oss on CentOS 5 (but not much more, and lower cpu load), but now is very very good on tickless kernels, eg: Ubuntu 10.04 LTS
This commit is contained in:
parent
7997d24f33
commit
739ac99e3b
|
@ -1,6 +1,6 @@
|
||||||
# Comment/uncomment the following line to disable/enable debugging
|
# Comment/uncomment the following line to disable/enable debugging
|
||||||
#DEBUG = y
|
#DEBUG = y
|
||||||
LDDINC=/usr/src/linux-headers-2.6.32-26-server/include
|
#LDDINC=/usr/src/linux-headers-2.6.32-26-server/include
|
||||||
|
|
||||||
# Add your debugging flag (or not) to CFLAGS
|
# Add your debugging flag (or not) to CFLAGS
|
||||||
ifeq ($(DEBUG),y)
|
ifeq ($(DEBUG),y)
|
||||||
|
|
|
@ -67,7 +67,7 @@ void my_timer_callback_inq( unsigned long data )
|
||||||
{
|
{
|
||||||
struct scull_dev *dev = (void *)data;
|
struct scull_dev *dev = (void *)data;
|
||||||
|
|
||||||
dev->readable=1;
|
//dev->readable=1;
|
||||||
wake_up_interruptible(&dev->inq);
|
wake_up_interruptible(&dev->inq);
|
||||||
mod_timer( &dev->timer_inq, jiffies + msecs_to_jiffies(GIOVA_SLEEP) );
|
mod_timer( &dev->timer_inq, jiffies + msecs_to_jiffies(GIOVA_SLEEP) );
|
||||||
|
|
||||||
|
@ -77,7 +77,7 @@ void my_timer_callback_outq( unsigned long data )
|
||||||
{
|
{
|
||||||
struct scull_dev *dev = (void *)data;
|
struct scull_dev *dev = (void *)data;
|
||||||
|
|
||||||
dev->writable=1;
|
//dev->writable=1;
|
||||||
wake_up_interruptible(&dev->outq);
|
wake_up_interruptible(&dev->outq);
|
||||||
mod_timer( &dev->timer_outq, jiffies + msecs_to_jiffies(GIOVA_SLEEP) );
|
mod_timer( &dev->timer_outq, jiffies + msecs_to_jiffies(GIOVA_SLEEP) );
|
||||||
}
|
}
|
||||||
|
@ -172,14 +172,14 @@ ssize_t scull_read(struct file *filp, char __user *buf, size_t count,
|
||||||
{
|
{
|
||||||
struct scull_dev *dev = filp->private_data;
|
struct scull_dev *dev = filp->private_data;
|
||||||
|
|
||||||
//DEFINE_WAIT(wait);
|
DEFINE_WAIT(wait);
|
||||||
//prepare_to_wait(&dev->inq, &wait, TASK_INTERRUPTIBLE);
|
prepare_to_wait(&dev->inq, &wait, TASK_INTERRUPTIBLE);
|
||||||
//schedule();
|
schedule();
|
||||||
//finish_wait(&dev->inq, &wait);
|
finish_wait(&dev->inq, &wait);
|
||||||
//memset(buf, 255, count);
|
//memset(buf, 255, count);
|
||||||
|
|
||||||
wait_event_interruptible(dev->inq, dev->readable);
|
//wait_event_interruptible(dev->inq, dev->readable);
|
||||||
dev->readable=0;
|
//dev->readable=0;
|
||||||
return count;
|
return count;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -188,13 +188,13 @@ ssize_t scull_write(struct file *filp, const char __user *buf, size_t count,
|
||||||
loff_t *f_pos)
|
loff_t *f_pos)
|
||||||
{
|
{
|
||||||
struct scull_dev *dev = filp->private_data;
|
struct scull_dev *dev = filp->private_data;
|
||||||
//DEFINE_WAIT(wait);
|
DEFINE_WAIT(wait);
|
||||||
//prepare_to_wait(&dev->outq, &wait, TASK_INTERRUPTIBLE);
|
prepare_to_wait(&dev->outq, &wait, TASK_INTERRUPTIBLE);
|
||||||
//schedule();
|
schedule();
|
||||||
//finish_wait(&dev->outq, &wait);
|
finish_wait(&dev->outq, &wait);
|
||||||
|
|
||||||
wait_event_interruptible(dev->outq, dev->writable);
|
//wait_event_interruptible(dev->outq, dev->writable);
|
||||||
dev->writable=0;
|
//dev->writable=0;
|
||||||
|
|
||||||
return count;
|
return count;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue