From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752274AbcJJHdq (ORCPT ); Mon, 10 Oct 2016 03:33:46 -0400 Received: from mx2.suse.de ([195.135.220.15]:47844 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751966AbcJJHdp (ORCPT ); Mon, 10 Oct 2016 03:33:45 -0400 Subject: Re: [PATCH 1/4] mm: adjust reserved highatomic count To: Minchan Kim References: <1475819136-24358-1-git-send-email-minchan@kernel.org> <1475819136-24358-2-git-send-email-minchan@kernel.org> <7ac7c0d8-4b7b-e362-08e7-6d62ee20f4c3@suse.cz> <20161007142919.GA3060@bbox> Cc: Andrew Morton , Mel Gorman , Joonsoo Kim , linux-kernel@vger.kernel.org, linux-mm@kvack.org, Sangseok Lee From: Vlastimil Babka Message-ID: Date: Mon, 10 Oct 2016 08:57:40 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.3.0 MIME-Version: 1.0 In-Reply-To: <20161007142919.GA3060@bbox> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 10/07/2016 04:29 PM, Minchan Kim wrote: >>> In that case, we should adjust nr_reserved_highatomic. >>> Otherwise, VM cannot reserve highorderatomic pageblocks any more >>> although it doesn't reach 1% limit. It means highorder atomic >>> allocation failure would be higher. >>> >>> So, this patch decreases the account as well as migratetype >>> if it was MIGRATE_HIGHATOMIC. >>> >>> Signed-off-by: Minchan Kim >> >> Hm wouldn't it be simpler just to prevent the pageblock's migratetype to be >> changed if it's highatomic? Possibly also not do move_freepages_block() in > > It could be. Actually, I did it with modifying can_steal_fallback which returns > false it found the pageblock is highorderatomic but changed to this way again > because I don't have any justification to prevent changing pageblock. > If you give concrete justification so others isn't against on it, I am happy to > do what you suggested. Well, MIGRATE_HIGHATOMIC is not listed in the fallbacks array at all, so we are not supposed to steal from it in the first place. Stealing will only happen due to races, which would be too costly to close, so we allow them and expect to be rare. But we shouldn't allow them to break the accounting. From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-lf0-f70.google.com (mail-lf0-f70.google.com [209.85.215.70]) by kanga.kvack.org (Postfix) with ESMTP id 946486B0069 for ; Mon, 10 Oct 2016 02:57:44 -0400 (EDT) Received: by mail-lf0-f70.google.com with SMTP id x79so32615352lff.2 for ; Sun, 09 Oct 2016 23:57:44 -0700 (PDT) Received: from mx2.suse.de (mx2.suse.de. [195.135.220.15]) by mx.google.com with ESMTPS id ke3si37038291wjb.240.2016.10.09.23.57.43 for (version=TLS1 cipher=AES128-SHA bits=128/128); Sun, 09 Oct 2016 23:57:43 -0700 (PDT) Subject: Re: [PATCH 1/4] mm: adjust reserved highatomic count References: <1475819136-24358-1-git-send-email-minchan@kernel.org> <1475819136-24358-2-git-send-email-minchan@kernel.org> <7ac7c0d8-4b7b-e362-08e7-6d62ee20f4c3@suse.cz> <20161007142919.GA3060@bbox> From: Vlastimil Babka Message-ID: Date: Mon, 10 Oct 2016 08:57:40 +0200 MIME-Version: 1.0 In-Reply-To: <20161007142919.GA3060@bbox> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Sender: owner-linux-mm@kvack.org List-ID: To: Minchan Kim Cc: Andrew Morton , Mel Gorman , Joonsoo Kim , linux-kernel@vger.kernel.org, linux-mm@kvack.org, Sangseok Lee On 10/07/2016 04:29 PM, Minchan Kim wrote: >>> In that case, we should adjust nr_reserved_highatomic. >>> Otherwise, VM cannot reserve highorderatomic pageblocks any more >>> although it doesn't reach 1% limit. It means highorder atomic >>> allocation failure would be higher. >>> >>> So, this patch decreases the account as well as migratetype >>> if it was MIGRATE_HIGHATOMIC. >>> >>> Signed-off-by: Minchan Kim >> >> Hm wouldn't it be simpler just to prevent the pageblock's migratetype to be >> changed if it's highatomic? Possibly also not do move_freepages_block() in > > It could be. Actually, I did it with modifying can_steal_fallback which returns > false it found the pageblock is highorderatomic but changed to this way again > because I don't have any justification to prevent changing pageblock. > If you give concrete justification so others isn't against on it, I am happy to > do what you suggested. Well, MIGRATE_HIGHATOMIC is not listed in the fallbacks array at all, so we are not supposed to steal from it in the first place. Stealing will only happen due to races, which would be too costly to close, so we allow them and expect to be rare. But we shouldn't allow them to break the accounting. -- 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