Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751430AbdILVM4 (ORCPT ); Tue, 12 Sep 2017 17:12:56 -0400 Received: from mail-wm0-f68.google.com ([74.125.82.68]:34372 "EHLO mail-wm0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750962AbdILVMz (ORCPT ); Tue, 12 Sep 2017 17:12:55 -0400 X-Google-Smtp-Source: AOwi7QCcvN6xowP3h/JrahL12gus3REthmWNUilll2l/Rqmg0LyTO4e0EkaPVk8dQFE7Ow4gw12cKg== Date: Tue, 12 Sep 2017 23:12:50 +0200 From: Alexandru Moise <00moses.alexander00@gmail.com> To: akpm@linux-foundation.org, linux-kernel@vger.kernel.org, khandual@linux.vnet.ibm.com, mhocko@suse.com, aarcange@redhat.com, minchan@kernel.org, hillf.zj@alibaba-inc.com, shli@fb.com, rppt@linux.vnet.ibm.com, kirill.shutemov@linux.intel.com, mgorman@techsingularity.net, rientjes@google.com, riel@redhat.com, linux-mm@kvack.org Subject: Re: [PATCH] mm, hugetlb, soft_offline: save compound page order before page migration Message-ID: <20170912211250.GB16850@gmail.com> References: <20170912204306.GA12053@gmail.com> <20170912135448.341359676c6f8045f4a622f0@linux-foundation.org> <20170912135835.0b48340ead5570e50529f676@linux-foundation.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20170912135835.0b48340ead5570e50529f676@linux-foundation.org> User-Agent: Mutt/1.9.0 (2017-09-02) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 867 Lines: 20 On Tue, Sep 12, 2017 at 01:58:35PM -0700, Andrew Morton wrote: > On Tue, 12 Sep 2017 13:54:48 -0700 Andrew Morton wrote: > > > On Tue, 12 Sep 2017 22:43:06 +0200 Alexandru Moise <00moses.alexander00@gmail.com> wrote: > > > > > This fixes a bug in madvise() where if you'd try to soft offline a > > > hugepage via madvise(), while walking the address range you'd end up, > > > using the wrong page offset due to attempting to get the compound > > > order of a former but presently not compound page, due to dissolving > > > the huge page (since c3114a8). > > > > What are the user visible effects of the bug? The wrong page is > > offlined? No offlining occurs? > > This also affects MADV_HWPOISON? No, MADV_HWPOISON is ok because it doesn't dissolve the hugepage, so the page remains a compound page the 2nd loop around. ../Alex