From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751733AbdFIWfa (ORCPT ); Fri, 9 Jun 2017 18:35:30 -0400 Received: from mail-pf0-f180.google.com ([209.85.192.180]:33275 "EHLO mail-pf0-f180.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751616AbdFIWf3 (ORCPT ); Fri, 9 Jun 2017 18:35:29 -0400 Date: Fri, 9 Jun 2017 15:35:27 -0700 (PDT) From: David Rientjes X-X-Sender: rientjes@chino.kir.corp.google.com To: Mike Kravetz cc: Andrew Morton , Naoya Horiguchi , "Aneesh Kumar K.V" , linux-kernel@vger.kernel.org, linux-mm@kvack.org Subject: Re: [patch -mm] mm, hugetlb: schedule when potentially allocating many hugepages In-Reply-To: <52ee0233-c3cd-d33a-a33b-50d49e050d5c@oracle.com> Message-ID: References: <52ee0233-c3cd-d33a-a33b-50d49e050d5c@oracle.com> User-Agent: Alpine 2.10 (DEB 1266 2009-07-14) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 7 Jun 2017, Mike Kravetz wrote: > > @@ -2364,6 +2366,7 @@ static unsigned long set_max_huge_pages(struct hstate *h, unsigned long count, > > ret = alloc_fresh_gigantic_page(h, nodes_allowed); > > else > > ret = alloc_fresh_huge_page(h, nodes_allowed); > > + cond_resched(); > > Are not the following lines immediately before the above huge page allocation > in set_max_huge_pages, or am I looking at an incorrect version of the file? > > /* yield cpu to avoid soft lockup */ > cond_resched(); Ahh, we don't have this in our tree, thanks for catching it. The other two cond_resched()'s are needed because we have reproduced them, so I'll send a v2.