From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pb0-f52.google.com (mail-pb0-f52.google.com [209.85.160.52]) by kanga.kvack.org (Postfix) with ESMTP id 2102D6B00EC for ; Wed, 6 Nov 2013 11:35:22 -0500 (EST) Received: by mail-pb0-f52.google.com with SMTP id rr4so2754871pbb.39 for ; Wed, 06 Nov 2013 08:35:21 -0800 (PST) Received: from psmtp.com ([74.125.245.174]) by mx.google.com with SMTP id yh6si17866050pab.34.2013.11.06.08.35.18 for ; Wed, 06 Nov 2013 08:35:19 -0800 (PST) Message-ID: <527A6F93.8070606@sr71.net> Date: Wed, 06 Nov 2013 08:34:27 -0800 From: Dave Hansen MIME-Version: 1.0 Subject: Re: [PATCH 2/2] mm: thp: give transparent hugepage code a separate copy_page References: <20131028221618.4078637F@viggo.jf.intel.com> <20131028221620.042323B3@viggo.jf.intel.com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Sender: owner-linux-mm@kvack.org List-ID: To: Hillf Danton Cc: LKML , Linux-MM , dave.jiang@intel.com, Mel Gorman , Andrew Morton On 11/06/2013 05:46 AM, Hillf Danton wrote: > On Tue, Oct 29, 2013 at 6:16 AM, Dave Hansen wrote: >> + >> +void copy_high_order_page(struct page *newpage, >> + struct page *oldpage, >> + int order) >> +{ >> + int i; >> + >> + might_sleep(); >> + for (i = 0; i < (1<> + cond_resched(); >> + copy_highpage(newpage + i, oldpage + i); >> + } >> +} > > Can we make no use of might_sleep here with cond_resched in loop? I'm not sure what you're saying. Are you pointing out that cond_resched() actually calls might_sleep() so the might_sleep() is redundant? -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: email@kvack.org