Re: 2.0.28 breaks gus sound

Matthias Welwarsky (dg2fef@uet.th-darmstadt.de)
Fri, 17 Jan 1997 11:21:07 +0100


Hannu Savolainen wrote:

> The GUS driver has not changed at all since early 2.0.x versions (2.0.10
> or so). In fact it has remained almost unchanged since Linux 1.0.x days.

Hm, stepping through patch-2.0.28 shows that most of the changes concern
the new vm86-syscall and the dgrs network-driver and some of the
scsi-drivers. Nothing really sound-related, I think. However, there's a
change in vmscan.c. Since this is the only change that affects the
system behaviour in general, I wonder if it could be *it* ?-)

--- v2.0.27/linux/mm/vmscan.c Sun Sep 15 10:34:18 1996
+++ linux/mm/vmscan.c Sat Dec 14 14:24:31 1996
@@ -108,13 +108,8 @@
} else {
if (page_map->count != 1)
return 0;
- if (!(entry = get_swap_page())) {
- /* Aieee!!! Out of swap space! */
- int retval = -1;
- if (nr_swapfiles == 0)
- retval = 0;
- return retval;
- }
+ if (!(entry = get_swap_page()))
+ return 0;
vma->vm_mm->rss--;
flush_cache_page(vma, address);
set_pte(page_table, __pte(entry));
@@ -317,9 +312,6 @@
if (!--p->swap_cnt)
swap_task++;
switch (swap_out_process(p, dma, wait)) {
- /* out of swap space? */
- case -1:
- return 0;
case 0:
if (p->swap_cnt)
swap_task++;
@@ -428,9 +420,22 @@

void swap_tick(void)
{
- if ((nr_free_pages + nr_async_pages) < free_pages_low ||
- ((nr_free_pages + nr_async_pages) < free_pages_high &&
- jiffies >= next_swap_jiffies)) {
+ int want_wakeup = 0;
+ static int last_wakeup_low = 0;
+
+ if ((nr_free_pages + nr_async_pages) < free_pages_low) {
+ if (last_wakeup_low)
+ want_wakeup = jiffies >= next_swap_jiffies;
+ else
+ last_wakeup_low = want_wakeup = 1;
+ }
+ else if (((nr_free_pages + nr_async_pages) < free_pages_high) &&
+ jiffies >= next_swap_jiffies) {
+ last_wakeup_low = 0;
+ want_wakeup = 1;
+ }
+
+ if (want_wakeup) {
if (!kswapd_awake && kswapd_ctl.maxpages > 0) {
wake_up(&kswapd_wait);
need_resched = 1;
(