Re: Re: Gracefully killing kswapd

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 9/7/05, Mulyadi Santosa <mulyadi.santosa@xxxxxxxxx> wrote:
> 
> I think I know why kswapd doesn't get killed. recall the fact that
> kswapd is kernel thread (therefore running in kernel mode) and signal
> handler (i mean the one which does the usual process termination) is
> only executed when a process wants to return from kernel space to user
> mode. read arch/i386/entry.S and search for "ENTRY(ret_from_sys_call)"
> and "signal_return:".
> 
> So, that's why kswapd just return back to TASK_RUNNING (previously
> TASK_(UN)INTERRUPTIBLE) and doing loop again and again.

I went through the arch/i386/kernel/entry.S file of kernel-2.6.11 and
havn't found the entry for ret_from_sys_call ......... but i found
that in kernel-2.4.28 but frankly speaking I m not able to recall
assembly language stuffs and need to spend some time to look what .S
files in kernel does, which I will sure do :)

By the way the thing which you mentioned looks valid to me  .....


> 
> I don't know clever way to stop kswapd, so I'll let other to give
> commentaries. Personally I think it is better to directly patch
> mm/vmscan.c rather than creating kswapd-alike kernel thread from kernel
> module.
> 

I agree with Mulyadi means better way is to patch the kernel's kswapd
(or replace that with own function) rather creating a thread which
works/helps in kernel/OS management stuffs from external module ....

But I m interested to know any other way of doing this .... As I don't
know a good way :)


-- 
Fawad Lateef

--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive:       http://mail.nl.linux.org/kernelnewbies/
FAQ:           http://kernelnewbies.org/faq/



[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux