The patch titled Subject: [v3] PM / Hibernate: Feed the wathdog when creating snapshot has been added to the -mm tree. Its filename is pm-hibernate-feed-the-wathdog-when-creating-snapshot-v3.patch This patch should soon appear at http://ozlabs.org/~akpm/mmots/broken-out/pm-hibernate-feed-the-wathdog-when-creating-snapshot-v3.patch and later at http://ozlabs.org/~akpm/mmotm/broken-out/pm-hibernate-feed-the-wathdog-when-creating-snapshot-v3.patch Before you just go and hit "reply", please: a) Consider who else should be cc'ed b) Prefer to cc a suitable mailing list as well c) Ideally: find the original patch on the mailing list and do a reply-to-all to that, adding suitable additional cc's *** Remember to use Documentation/SubmitChecklist when testing your code *** The -mm tree is included into linux-next and is updated there every 3-4 working days ------------------------------------------------------ From: Chen Yu <yu.c.chen@xxxxxxxxx> Subject: [v3] PM / Hibernate: Feed the wathdog when creating snapshot simplification Link: http://lkml.kernel.org/r/1503460079-29721-1-git-send-email-yu.c.chen@xxxxxxxxx Signed-off-by: Chen Yu <yu.c.chen@xxxxxxxxx> Cc: Jan Filipcewicz <jan.filipcewicz@xxxxxxxxx> Cc: Michal Hocko <mhocko@xxxxxxxx> Cc: Mel Gorman <mgorman@xxxxxxxxxxxxxxxxxxx> Cc: Vlastimil Babka <vbabka@xxxxxxx> Cc: "Rafael J. Wysocki" <rjw@xxxxxxxxxxxxx> Cc: Len Brown <lenb@xxxxxxxxxx> Cc: Dan Williams <dan.j.williams@xxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- mm/page_alloc.c | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff -puN mm/page_alloc.c~pm-hibernate-feed-the-wathdog-when-creating-snapshot-v3 mm/page_alloc.c --- a/mm/page_alloc.c~pm-hibernate-feed-the-wathdog-when-creating-snapshot-v3 +++ a/mm/page_alloc.c @@ -2537,14 +2537,13 @@ void drain_all_pages(struct zone *zone) #ifdef CONFIG_HIBERNATION /* - * Touch the watchdog for every WD_INTERVAL_PAGE pages, - * choose a power of 2 to avoid the modulus operation. + * Touch the watchdog for every WD_PAGE_COUNT pages. */ -#define WD_INTERVAL_PAGE (128*1024) +#define WD_PAGE_COUNT (128*1024) void mark_free_pages(struct zone *zone) { - unsigned long pfn, max_zone_pfn, page_num = 0; + unsigned long pfn, max_zone_pfn, page_count = WD_PAGE_COUNT; unsigned long flags; unsigned int order, t; struct page *page; @@ -2559,8 +2558,10 @@ void mark_free_pages(struct zone *zone) if (pfn_valid(pfn)) { page = pfn_to_page(pfn); - if (!((page_num++) % WD_INTERVAL_PAGE)) + if (!--page_count) { touch_nmi_watchdog(); + page_count = WD_PAGE_COUNT; + } if (page_zone(page) != zone) continue; @@ -2576,8 +2577,10 @@ void mark_free_pages(struct zone *zone) pfn = page_to_pfn(page); for (i = 0; i < (1UL << order); i++) { - if (!((page_num++) % WD_INTERVAL_PAGE)) + if (!--page_count) { touch_nmi_watchdog(); + page_count = WD_PAGE_COUNT; + } swsusp_set_page_free(pfn_to_page(pfn + i)); } } _ Patches currently in -mm which might be from yu.c.chen@xxxxxxxxx are pm-hibernate-feed-the-wathdog-when-creating-snapshot.patch pm-hibernate-feed-the-wathdog-when-creating-snapshot-v2.patch pm-hibernate-feed-the-wathdog-when-creating-snapshot-v3.patch -- To unsubscribe from this list: send the line "unsubscribe mm-commits" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html