[ Pobierz całość w formacie PDF ]
.4.2.2 $", *s, *e;current->session = 1;current->pgrp = 1;sprintf(current->comm, "kswapd");current->blocked = ~0UL;#ifdef __SMP__lock_kernel();syscall_count++;#endif/* Give kswapd a realtime priority.*/current->policy = SCHED_FIFO;current->priority = 32;init_swap_timer();if ((s = strchr(revision, ':')) &&(e = strchr(s, '$')))s++, i = e - s;elses = revision, i = -1;printk ("Started kswapd v%.*s\n", i, s);while (1) {kswapd_awake = 0;current->signal = 0;interruptible_sleep_on(&kswapd_wait);kswapd_awake = 1;swapstats.wakeups++;/* Do the background pageout: */for (i=0; i < kswapd_ctl.maxpages; i++)try_to_free_page(GFP_KERNEL, 0, 0);}}/* Funkcja swap_tick jest wolana za kazdym tyknieciem zegara */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)) {if (!kswapd_awake && kswapd_ctl.maxpages > 0) {wake_up(&kswapd_wait);need_resched = 1;kswapd_awake = 1;}next_swap_jiffies = jiffies + swapout_interval;}timer_active |= (1
[ Pobierz całość w formacie PDF ]