Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751834AbcCaBCY (ORCPT ); Wed, 30 Mar 2016 21:02:24 -0400 Received: from TYO202.gate.nec.co.jp ([210.143.35.52]:40504 "EHLO tyo202.gate.nec.co.jp" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750803AbcCaBCX convert rfc822-to-8bit (ORCPT ); Wed, 30 Mar 2016 21:02:23 -0400 From: Naoya Horiguchi To: Mike Kravetz CC: "linux-mm@kvack.org" , "linux-kernel@vger.kernel.org" , Hillf Danton , David Rientjes , Dave Hansen , "Kirill A. Shutemov" , Andrew Morton , Paul Gortmaker Subject: Re: [PATCH] mm/hugetlb: optimize minimum size (min_size) accounting Thread-Topic: [PATCH] mm/hugetlb: optimize minimum size (min_size) accounting Thread-Index: AQHRhvBecqfSEOX0B0iDm3GE/qS5K59yLI4A Date: Thu, 31 Mar 2016 01:00:03 +0000 Message-ID: <20160331010002.GA20652@hori1.linux.bs1.fc.nec.co.jp> References: <1458949498-18916-1-git-send-email-mike.kravetz@oracle.com> In-Reply-To: <1458949498-18916-1-git-send-email-mike.kravetz@oracle.com> Accept-Language: ja-JP, en-US Content-Language: ja-JP X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.128.101.30] Content-Type: text/plain; charset="iso-2022-jp" Content-ID: Content-Transfer-Encoding: 8BIT MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1196 Lines: 23 On Fri, Mar 25, 2016 at 04:44:58PM -0700, Mike Kravetz wrote: > It was observed that minimum size accounting associated with the > hugetlbfs min_size mount option may not perform optimally and as > expected. As huge pages/reservations are released from the filesystem > and given back to the global pools, they are reserved for subsequent > filesystem use as long as the subpool reserved count is less than > subpool minimum size. It does not take into account used pages > within the filesystem. The filesystem size limits are not exceeded > and this is technically not a bug. However, better behavior would > be to wait for the number of used pages/reservations associated with > the filesystem to drop below the minimum size before taking reservations > to satisfy minimum size. > > An optimization is also made to the hugepage_subpool_get_pages() > routine which is called when pages/reservations are allocated. This > does not change behavior, but simply avoids the accounting if all > reservations have already been taken (subpool reserved count == 0). > > Signed-off-by: Mike Kravetz Seems OK to me. Acked-by: Naoya Horiguchi