[PATCH 1/2] Implementation of prefetch core functionality (tracing and prefetching)

Krzysztof Lichota krzysiek at lichota.net
Thu Sep 13 22:49:23 UTC 2007


Ben Collins napisaƂ(a):
> +///Checks if @line is exactly the same as @param_name, not exceeding param_name length for safety.
> +int param_match(char *line, char *param_name);
> 
> I'm hoping this code is aimed at getting included upstream. As such,
> please change the "// ..." style comments to "/* ... */"

Done.

> +#ifdef CONFIG_PREFETCH_CORE
> +void prefetch_page_release_hook(struct page *page);
> +#endif
> +
> 
> Should probably be in prefetch_core.h and include that instead of a
> hardcoded declaration.

Done.

> @@ -115,7 +119,11 @@ generic_file_direct_IO(int rw, struct ki
>  void __remove_from_page_cache(struct page *page)
>  {
>  	struct address_space *mapping = page->mapping;
> -
> +	
> +#ifdef CONFIG_PREFETCH_CORE
> +	prefetch_page_release_hook(page);
> +#endif
> 
> Likewise, the header should declare this as a nop macro, e.g.
> do{}while(0) when PREFETCH_CORE is not defined. Keeps the code clean.

Done.

> +enum {
> +	DEFAULT_TRACE_SIZE_KB = 256 //default trace size is 256 KB
> +};
> 
> Single unnamed enum, probably should just be a define.

Done.

> +enum tracing_command_t {
> +	START_TRACING,
> +	STOP_TRACING,
> +	CONTINUE_TRACING
> +};
> 
> *_t should be for typedefs, not enum names. Just remove the _t

Done.

> Please read Documentation/CodingStyle and fix things up appropriately.

I have cleaned the patches and added application prefetching to patch
set. Patches will follow in subsequent e-mails.

	Krzysztof Lichota


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 254 bytes
Desc: OpenPGP digital signature
URL: <https://lists.ubuntu.com/archives/kernel-team/attachments/20070914/93e9b8a8/attachment.sig>


More information about the kernel-team mailing list