Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753513AbbFSAOJ (ORCPT ); Thu, 18 Jun 2015 20:14:09 -0400 Received: from mail-pa0-f47.google.com ([209.85.220.47]:33033 "EHLO mail-pa0-f47.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752446AbbFSAN5 (ORCPT ); Thu, 18 Jun 2015 20:13:57 -0400 Date: Fri, 19 Jun 2015 09:14:23 +0900 From: Sergey Senozhatsky To: David Rientjes Cc: Andrew Morton , Michal Hocko , linux-kernel@vger.kernel.org, linux-mm@kvack.org Subject: Re: [patch 1/3] mm, oom: organize oom context into struct Message-ID: <20150619001423.GA5628@swordfish> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.23+89 (0255b37be491) (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1515 Lines: 48 Hello, On (06/18/15 16:00), David Rientjes wrote: > There are essential elements to an oom context that are passed around to > multiple functions. > > Organize these elements into a new struct, struct oom_context, that > specifies the context for an oom condition. > s/oom_context/oom_control/ ? [..] > > +struct oom_control { > + struct zonelist *zonelist; > + nodemask_t *nodemask; > + gfp_t gfp_mask; > + int order; > + bool force_kill; > +}; > + > -extern void check_panic_on_oom(enum oom_constraint constraint, gfp_t gfp_mask, > - int order, const nodemask_t *nodemask, > +extern void check_panic_on_oom(struct oom_control *oc, > + enum oom_constraint constraint, > struct mem_cgroup *memcg); > > -extern enum oom_scan_t oom_scan_process_thread(struct task_struct *task, > - unsigned long totalpages, const nodemask_t *nodemask, > - bool force_kill); > +extern enum oom_scan_t oom_scan_process_thread(struct oom_control *oc, > + struct task_struct *task, unsigned long totalpages); > > -extern bool out_of_memory(struct zonelist *zonelist, gfp_t gfp_mask, > - int order, nodemask_t *mask, bool force_kill); > +extern bool out_of_memory(struct oom_control *oc); > > extern void exit_oom_victim(void); > [..] -ss -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/