From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752607AbdLHHuS (ORCPT ); Fri, 8 Dec 2017 02:50:18 -0500 Received: from mx2.suse.de ([195.135.220.15]:33968 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752214AbdLHHuR (ORCPT ); Fri, 8 Dec 2017 02:50:17 -0500 Date: Fri, 8 Dec 2017 08:50:14 +0100 From: Michal Hocko To: David Rientjes Cc: Tetsuo Handa , Andrew Morton , Andrea Arcangeli , linux-kernel@vger.kernel.org, linux-mm@kvack.org Subject: Re: Multiple oom_reaper BUGs: unmap_page_range racing with exit_mmap Message-ID: <20171208075014.GN20234@dhcp22.suse.cz> References: <20171206090019.GE16386@dhcp22.suse.cz> <201712070720.vB77KlBQ009754@www262.sakura.ne.jp> <20171207082801.GB20234@dhcp22.suse.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.9.1 (2017-09-22) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu 07-12-17 13:22:30, David Rientjes wrote: [...] > > diff --git a/include/linux/sched/coredump.h b/include/linux/sched/coredump.h > > index 9c8847395b5e..da673ca66e7a 100644 > > --- a/include/linux/sched/coredump.h > > +++ b/include/linux/sched/coredump.h > > @@ -68,8 +68,9 @@ static inline int get_dumpable(struct mm_struct *mm) > > #define MMF_RECALC_UPROBES 20 /* MMF_HAS_UPROBES can be wrong */ > > #define MMF_OOM_SKIP 21 /* mm is of no interest for the OOM killer */ > > #define MMF_UNSTABLE 22 /* mm is unstable for copy_from_user */ > > -#define MMF_HUGE_ZERO_PAGE 23 /* mm has ever used the global huge zero page */ > > -#define MMF_DISABLE_THP 24 /* disable THP for all VMAs */ > > +#define MMF_OOM_VICTIM 23 /* mm is the oom victim */ > > +#define MMF_HUGE_ZERO_PAGE 24 /* mm has ever used the global huge zero page */ > > +#define MMF_DISABLE_THP 25 /* disable THP for all VMAs */ > > #define MMF_DISABLE_THP_MASK (1 << MMF_DISABLE_THP) > > > > #define MMF_INIT_MASK (MMF_DUMPABLE_MASK | MMF_DUMP_FILTER_MASK |\ > > Could we not adjust the bit values, but simply add new one for > MMF_OOM_VICTIM? We have automated tools that look at specific bits in > mm->flags and it would be nice to not have them be inconsistent between > kernel versions. Not absolutely required, but nice to avoid. I just wanted to have those semantically related bits closer together. But I do not insist on this. -- Michal Hocko SUSE Labs