Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752814AbbGAALM (ORCPT ); Tue, 30 Jun 2015 20:11:12 -0400 Received: from mail-pd0-f181.google.com ([209.85.192.181]:34539 "EHLO mail-pd0-f181.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751459AbbGAALG (ORCPT ); Tue, 30 Jun 2015 20:11:06 -0400 Date: Wed, 1 Jul 2015 09:11:34 +0900 From: Sergey Senozhatsky To: David Rientjes Cc: Sergey Senozhatsky , 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: <20150701001134.GA654@swordfish> References: <20150619001423.GA5628@swordfish> 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: 1433 Lines: 56 On (06/30/15 15:46), 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/ ? > > > > I think it would be confused with the existing memory.oom_control for > memcg. > Hello David, Sorry, I meant that in commit message you say :Organize these elements into a new struct, struct oom_context, that :specifies the context for an oom condition. but define and use `struct oom_control' (not `struct oom_context') [..] + const gfp_t gfp_mask = GFP_KERNEL; + struct oom_control oc = { + .zonelist = node_zonelist(first_memory_node, gfp_mask), + .nodemask = NULL, + .gfp_mask = gfp_mask, + .order = 0, + .force_kill = true, + }; + [..] +struct oom_control { + struct zonelist *zonelist; + nodemask_t *nodemask; + gfp_t gfp_mask; + int order; + bool force_kill; +}; [..] etc. -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/