From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752945AbbGNXpP (ORCPT ); Tue, 14 Jul 2015 19:45:15 -0400 Received: from mail-ie0-f171.google.com ([209.85.223.171]:33498 "EHLO mail-ie0-f171.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751976AbbGNXpN (ORCPT ); Tue, 14 Jul 2015 19:45:13 -0400 Date: Tue, 14 Jul 2015 16:45:11 -0700 (PDT) From: David Rientjes X-X-Sender: rientjes@chino.kir.corp.google.com To: Andrew Morton cc: Sergey Senozhatsky , Michal Hocko , linux-kernel@vger.kernel.org, linux-mm@kvack.org Subject: [patch -mm 1/2] mm, oom: add description of struct oom_control Message-ID: User-Agent: Alpine 2.10 (DEB 1266 2009-07-14) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Describe the purpose of struct oom_control and what each member does. Also make gfp_mask and order const since they are never manipulated or passed to functions that discard the qualifier. Signed-off-by: David Rientjes --- include/linux/oom.h | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) diff --git a/include/linux/oom.h b/include/linux/oom.h --- a/include/linux/oom.h +++ b/include/linux/oom.h @@ -12,11 +12,25 @@ struct notifier_block; struct mem_cgroup; struct task_struct; +/* + * Details of the page allocation that triggered the oom killer that are used to + * determine what should be killed. + */ struct oom_control { + /* Used to determine cpuset */ struct zonelist *zonelist; - nodemask_t *nodemask; - gfp_t gfp_mask; - int order; + + /* Used to determine mempolicy */ + nodemask_t *nodemask; + + /* Used to determine cpuset and node locality requirement */ + const gfp_t gfp_mask; + + /* + * order == -1 means the oom kill is required by sysrq, otherwise only + * for display purposes. + */ + const int order; }; /*