Re: patch for kdb 4.4 to fix compiling without CONFIG_SWAP

Jay Lan <[email protected]>
Newsgroups gmane.linux.kernel.debugging
Message-ID <[email protected]>
Nicolas S. Dade wrote:
> I've noticed kdb 4.4 does not compile if CONFIG_SWAP is not set. There seems
> to reason to require swap, so the attached patch removes the two calls to
> kdb_si_swapinfo() which break the compile.

Hi Nicolas,

I turned off CONFIG_SWAP and tried. It built fine in my 2.6.23-rc3
tree and in the sles10sp1 (2.6.16.46) tree.

Did you see the same problem on si_swapinfo()? If you had compilation
problem in kdb_si_swapinfo(), you should have had the same problem
with si_swapinfo().

Regards,
 - jay


> -Nicolas Dade
> 
> 
> -- Attached file included as plaintext by Ecartis --
> 
> --- linux-2.6.16.51/fs/proc/proc_misc.c	2007-08-15 19:00:52.000000000 -0700
> +++ linux-2.6.16.51/fs/proc/proc_misc.c	2007-08-15 19:02:44.000000000 -0700
> @@ -230,7 +230,9 @@
>   */
>  #define K(x) ((x) << (PAGE_SHIFT - 10))
>  	si_meminfo(&i);
> +#ifdef CONFIG_SWAP
>  	kdb_si_swapinfo(&i);
> +#endif
>  	committed = atomic_read(&vm_committed_space);
>  	allowed = ((totalram_pages - hugetlb_total_pages())
>  		* sysctl_overcommit_ratio / 100) + total_swap_pages;
> --- linux-2.6.16.51//kdb/kdbmain.c	2007-08-15 19:03:22.000000000 -0700
> +++ linux-2.6.16.51//kdb/kdbmain.c	2007-08-15 19:09:55.000000000 -0700
> @@ -3424,8 +3424,10 @@
>  	val->loads[2] = avenrun[2];
>  	val->procs = nr_threads-1;
>  	si_meminfo(val);
> +#ifdef CONFIG_SWAP
>  	kdb_si_swapinfo(val);
> +#endif
>  
>  	return;
>  }
> 
> 
> ---------------------------
> Use http://oss.sgi.com/ecartis to modify your settings or to unsubscribe.

---------------------------
Use http://oss.sgi.com/ecartis to modify your settings or to unsubscribe.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.