From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from psmtp.com (na3sys010amx153.postini.com [74.125.245.153]) by kanga.kvack.org (Postfix) with SMTP id A5A1F6B0062 for ; Wed, 20 Jun 2012 05:06:21 -0400 (EDT) Message-ID: <4FE1915B.3040303@huawei.com> Date: Wed, 20 Jun 2012 17:01:15 +0800 From: Jiang Liu MIME-Version: 1.0 Subject: Re: [PATCH] trivial, memory hotplug: add kswapd_is_running() for better readability References: <4FD97718.6060008@kernel.org> <1339663776-196-1-git-send-email-jiang.liu@huawei.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: David Rientjes Cc: Minchan Kim , Keping Chen , Mel Gorman , KOSAKI Motohiro , KAMEZAWA Hiroyuki , Andrew Morton , Hugh Dickins , Tony Luck , linux-mm@kvack.org, linux-kernel@vger.kernel.org, Jiang Liu > This isn't better, there's no functional change and you've just added a > second conditional for no reason and an unnecessary kswapd_is_running() > function. > > More concerning is that online_pages() doesn't check the return value of > kswapd_run(). We should probably fail the memory hotplug operation that > onlines a new node and doesn't have a kswapd running and cleanup after > ourselves in online_pages() with some sane error handling. Hi David, Good points! Is it feasible to use schedule_delayed_work_on() to retry kswapd_run() instead of ralling back the online operation in case kswapd_run() failed to create the work thread? Thank! Gerry -- 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