Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1184144
| From | David Rientjes <rientjes@google.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [patch v3 1/3] mm, oom: organize oom context into struct |
| Date | 2015-07-15 01:50 +0200 |
| Message-ID | <pMi7x-72M-19@gated-at.bofh.it> (permalink) |
| References | <pCR6z-69t-43@gated-at.bofh.it> <pHxTA-28A-1@gated-at.bofh.it> <pK7ge-183-5@gated-at.bofh.it> <pMhl9-5SA-31@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On Tue, 14 Jul 2015, Andrew Morton wrote:
> > --- a/include/linux/oom.h
> > +++ b/include/linux/oom.h
> > @@ -12,6 +12,14 @@ struct notifier_block;
> > struct mem_cgroup;
> > struct task_struct;
> >
> > +struct oom_control {
> > + struct zonelist *zonelist;
> > + nodemask_t *nodemask;
> > + gfp_t gfp_mask;
> > + int order;
> > + bool force_kill;
> > +};
>
> Some docs would be nice.
>
Ok!
> gfp_mask and order are what the page-allocating caller originally asked
> for, I think? They haven't been mucked with?
>
Yes, it's a good opportunity to make them const.
> It's somewhat obvious what force_kill does, but why is it provided, why
> is it set? And what does it actually kill? A process which was
> selected based on the other fields...
>
It's removed in the next patch since it's unneeded, so I'll define what
order == -1 means.
> Also, it's a bit odd that zonelist and nodemask are here. They're
> low-level implementation details whereas the other three fields are
> high-level caller control stuff.
>
Zonelist and nodemask are indeed pretty weird here. We use them to
determine if the oom kill is constrained by cpuset and/or mempolicy,
respectively so we don't kill things unnecessarily and leave a cpuset
still oom, for example. We could determine that before actually calling
the oom killer and passing the enum oom_constraint in, but its purpose is
for the oom killer so it's just a part of that logical unit.
--
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/
Back to linux.kernel | Previous | Next — Previous in thread | Find similar | Unroll thread
[patch v3 1/3] mm, oom: organize oom context into struct David Rientjes <rientjes@google.com> - 2015-07-09 01:50 +0200 [patch v3 2/3] mm, oom: pass an oom order of -1 when triggered by sysrq David Rientjes <rientjes@google.com> - 2015-07-09 01:50 +0200 [patch v3 3/3] mm, oom: do not panic for oom kills triggered from sysrq David Rientjes <rientjes@google.com> - 2015-07-09 01:50 +0200 Re: [patch v3 1/3] mm, oom: organize oom context into struct David Rientjes <rientjes@google.com> - 2015-07-15 01:50 +0200
csiph-web