From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751108AbdEVLms (ORCPT ); Mon, 22 May 2017 07:42:48 -0400 Received: from mail-wm0-f68.google.com ([74.125.82.68]:32859 "EHLO mail-wm0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750842AbdEVLmq (ORCPT ); Mon, 22 May 2017 07:42:46 -0400 Date: Mon, 22 May 2017 14:42:43 +0300 From: "Kirill A. Shutemov" To: Mike Rapoport Cc: Andrew Morton , Arnd Bergmann , "Kirill A. Shutemov" , Andrea Arcangeli , linux-mm , lkml Subject: Re: [PATCH] mm: introduce MADV_CLR_HUGEPAGE Message-ID: <20170522114243.2wrdbncilozygbpl@node.shutemov.name> References: <1495433562-26625-1-git-send-email-rppt@linux.vnet.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1495433562-26625-1-git-send-email-rppt@linux.vnet.ibm.com> User-Agent: NeoMutt/20170428 (1.8.2) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, May 22, 2017 at 09:12:42AM +0300, Mike Rapoport wrote: > Currently applications can explicitly enable or disable THP for a memory > region using MADV_HUGEPAGE or MADV_NOHUGEPAGE. However, once either of > these advises is used, the region will always have > VM_HUGEPAGE/VM_NOHUGEPAGE flag set in vma->vm_flags. > The MADV_CLR_HUGEPAGE resets both these flags and allows managing THP in > the region according to system-wide settings. Seems reasonable. But could you describe an use-case when it's useful in real world. And the name is bad. But I don't have better suggestion. At least do not abbreviate CLEAR. Saving two letters doesn't worth it. Maybe RESET instead? -- Kirill A. Shutemov