Re: [PATCH] kmemcheck: add scheduling point to kmemleak_scan

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

 



Please fix the subject as the tool is called "kmemleak" rather than
"kmemcheck".

On Fri, Nov 17, 2017 at 03:03:56PM +0800, Yisheng Xie wrote:
> diff --git a/mm/kmemleak.c b/mm/kmemleak.c
> index e4738d5..e9f2e86 100644
> --- a/mm/kmemleak.c
> +++ b/mm/kmemleak.c
> @@ -1523,6 +1523,8 @@ static void kmemleak_scan(void)
>  			if (page_count(page) == 0)
>  				continue;
>  			scan_block(page, page + 1, NULL);
> +			if (!(pfn % 1024))
> +				cond_resched();

For consistency with the other places where we call cond_resched() in
kmemleak, I would use MAX_SCAN_SIZE. Something like

			if (!(pfn % (MAX_SCAN_SIZE / sizeof(page))))
				cont_resched();

Thanks.

-- 
Catalin

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@xxxxxxxxx.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@xxxxxxxxx";> email@xxxxxxxxx </a>



[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]
  Powered by Linux