From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754600AbcJLIEE (ORCPT ); Wed, 12 Oct 2016 04:04:04 -0400 Received: from LGEAMRELO12.lge.com ([156.147.23.52]:51753 "EHLO lgeamrelo12.lge.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754481AbcJLIDq (ORCPT ); Wed, 12 Oct 2016 04:03:46 -0400 X-Original-SENDERIP: 156.147.1.126 X-Original-MAILFROM: minchan@kernel.org X-Original-SENDERIP: 165.244.98.204 X-Original-MAILFROM: minchan@kernel.org X-Original-SENDERIP: 10.177.223.161 X-Original-MAILFROM: minchan@kernel.org Date: Wed, 12 Oct 2016 16:48:38 +0900 From: Minchan Kim To: Michal Hocko CC: Andrew Morton , Mel Gorman , Vlastimil Babka , Joonsoo Kim , , , Sangseok Lee Subject: Re: [PATCH v2 4/4] mm: make unreserve highatomic functions reliable Message-ID: <20161012074838.GA7688@bbox> References: <1476250416-22733-1-git-send-email-minchan@kernel.org> <1476250416-22733-5-git-send-email-minchan@kernel.org> <20161012073328.GC9504@dhcp22.suse.cz> MIME-Version: 1.0 In-Reply-To: <20161012073328.GC9504@dhcp22.suse.cz> User-Agent: Mutt/1.5.24 (2015-08-30) X-MIMETrack: Itemize by SMTP Server on LGEKRMHUB04/LGE/LG Group(Release 8.5.3FP6|November 21, 2013) at 2016/10/12 16:48:38, Serialize by Router on LGEKRMHUB04/LGE/LG Group(Release 8.5.3FP6|November 21, 2013) at 2016/10/12 16:48:38, Serialize complete at 2016/10/12 16:48:38 Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Oct 12, 2016 at 09:33:28AM +0200, Michal Hocko wrote: > On Wed 12-10-16 14:33:36, Minchan Kim wrote: > [...] > > @@ -2138,8 +2146,10 @@ static bool unreserve_highatomic_pageblock(const struct alloc_context *ac) > > */ > > set_pageblock_migratetype(page, ac->migratetype); > > ret = move_freepages_block(zone, page, ac->migratetype); > > - spin_unlock_irqrestore(&zone->lock, flags); > > - return ret; > > + if (!drain && ret) { > > + spin_unlock_irqrestore(&zone->lock, flags); > > + return ret; > > + } > > I've already mentioned that during the previous discussion. This sounds Yeb, we did but I sent wrong version in my git tree. :( > overly aggressive to me. Why do we want to drain the whole reserve and > risk that we won't be able to build up a new one after OOM. Doing one > block at the time should be sufficient IMHO. I will resend with updating with every reveiw points. Thanks.