ureadahead patch

Bryan Wu bryan.wu at canonical.com
Fri Jul 9 01:15:42 UTC 2010


Tim,

This patch is quite on time for my hibernation bug in a customer's project.

The root cause is ureadahead will set the tracing buffer size to 128MB, then do
profiling. But after that ureadahead never restores the old tracing buffer size
back. Due to the big chunk of memory occupied by ureadahead, hibernation will
fail when it preallocate memory to build hibernation image in memory.

We tried to restore back the tracing buffer size to workaround this issue.

So I just wanna say, please push this patch to ureadahead repo and upload for
us. I will test this patch on the machine.

Thanks again,
-Bryan

On 07/09/2010 12:24 AM, Tim Gardner wrote:
> diff -u ureadahead-0.100.0/debian/changelog ureadahead-0.100.0/debian/changelog
> --- ureadahead-0.100.0/debian/changelog
> +++ ureadahead-0.100.0/debian/changelog
> @@ -1,3 +1,9 @@
> +ureadahead (0.100.0-5ubuntu1) maverick; urgency=low
> +
> +  * 
> +
> + -- Tim Gardner <rtg at lochsa>  Thu, 08 Jul 2010 16:04:39 +0000
> +
>  ureadahead (0.100.0-5) maverick; urgency=low
>  
>    * src/pack.c: Amend mount point detection logic to stat the mount point
> only in patch2:
> unchanged:
> --- ureadahead-0.100.0.orig/src/trace.c
> +++ ureadahead-0.100.0/src/trace.c
> @@ -122,6 +122,7 @@
>  	int                 old_open_exec_enabled = 0;
>  	int                 old_uselib_enabled = 0;
>  	int                 old_tracing_enabled = 0;
> +	int                 old_buffer_size_kb = 0;
>  	struct sigaction    act;
>  	struct sigaction    old_sigterm;
>  	struct sigaction    old_sigint;
> @@ -165,7 +166,7 @@
>  
>  		old_uselib_enabled = -1;
>  	}
> -	if (set_value (dfd, "buffer_size_kb", 128000, NULL) < 0)
> +	if (set_value (dfd, "buffer_size_kb", 128000, &old_buffer_size_kb) < 0)
>  		goto error;
>  	if (set_value (dfd, "tracing_enabled",
>  		       TRUE, &old_tracing_enabled) < 0)
> @@ -217,6 +218,9 @@
>  	if (set_value (dfd, "events/fs/do_sys_open/enable",
>  		       old_sys_open_enabled, NULL) < 0)
>  		goto error;
> +	if (set_value (dfd, "buffer_size_kb",
> +		       old_buffer_size_kb, NULL) < 0)
> +		goto error;
>  
>  	/* Be nicer */
>  	if (nice (15))
> 





More information about the kernel-team mailing list