Re: [RFC 0/2] opportunistic memory reclaim of a killed process

2019-04-11 Thread Joel Fernandes
On Thu, Apr 11, 2019 at 10:11:51PM +0200, Michal Hocko wrote: > On Thu 11-04-19 15:14:30, Joel Fernandes wrote: > > On Thu, Apr 11, 2019 at 08:12:43PM +0200, Michal Hocko wrote: > > > On Thu 11-04-19 12:18:33, Joel Fernandes wrote: > > > > On Thu, Apr 11, 2019 at 6:51 AM Michal Hocko wrote: > > >

Re: [RFC 0/2] opportunistic memory reclaim of a killed process

2019-04-11 Thread Michal Hocko
On Thu 11-04-19 12:56:32, Suren Baghdasaryan wrote: > On Thu, Apr 11, 2019 at 11:19 AM Michal Hocko wrote: > > > > On Thu 11-04-19 09:47:31, Suren Baghdasaryan wrote: > > [...] > > > > I would question whether we really need this at all? Relying on the exit > > > > speed sounds like a fundamental

Re: [RFC 0/2] opportunistic memory reclaim of a killed process

2019-04-11 Thread Michal Hocko
On Thu 11-04-19 15:14:30, Joel Fernandes wrote: > On Thu, Apr 11, 2019 at 08:12:43PM +0200, Michal Hocko wrote: > > On Thu 11-04-19 12:18:33, Joel Fernandes wrote: > > > On Thu, Apr 11, 2019 at 6:51 AM Michal Hocko wrote: > > > > > > > > On Wed 10-04-19 18:43:51, Suren Baghdasaryan wrote: > > > >

Re: [RFC 0/2] opportunistic memory reclaim of a killed process

2019-04-11 Thread Suren Baghdasaryan
On Thu, Apr 11, 2019 at 11:19 AM Michal Hocko wrote: > > On Thu 11-04-19 09:47:31, Suren Baghdasaryan wrote: > [...] > > > I would question whether we really need this at all? Relying on the exit > > > speed sounds like a fundamental design problem of anything that relies > > > on it. > > > >

Re: [RFC 0/2] opportunistic memory reclaim of a killed process

2019-04-11 Thread Joel Fernandes
On Thu, Apr 11, 2019 at 08:12:43PM +0200, Michal Hocko wrote: > On Thu 11-04-19 12:18:33, Joel Fernandes wrote: > > On Thu, Apr 11, 2019 at 6:51 AM Michal Hocko wrote: > > > > > > On Wed 10-04-19 18:43:51, Suren Baghdasaryan wrote: > > > [...] > > > > Proposed solution uses existing oom-reaper

Re: [RFC 0/2] opportunistic memory reclaim of a killed process

2019-04-11 Thread Michal Hocko
On Thu 11-04-19 09:47:31, Suren Baghdasaryan wrote: [...] > > I would question whether we really need this at all? Relying on the exit > > speed sounds like a fundamental design problem of anything that relies > > on it. > > Relying on it is wrong, I agree. There are protections like allocation >

Re: [RFC 0/2] opportunistic memory reclaim of a killed process

2019-04-11 Thread Michal Hocko
On Thu 11-04-19 12:18:33, Joel Fernandes wrote: > On Thu, Apr 11, 2019 at 6:51 AM Michal Hocko wrote: > > > > On Wed 10-04-19 18:43:51, Suren Baghdasaryan wrote: > > [...] > > > Proposed solution uses existing oom-reaper thread to increase memory > > > reclaim rate of a killed process and to make

Re: [RFC 0/2] opportunistic memory reclaim of a killed process

2019-04-11 Thread Johannes Weiner
On Thu, Apr 11, 2019 at 12:51:11PM +0200, Michal Hocko wrote: > I would question whether we really need this at all? Relying on the exit > speed sounds like a fundamental design problem of anything that relies > on it. Sure task exit might be slow, but async mm tear down is just a > mere

Re: [Lsf-pc] [RFC 0/2] opportunistic memory reclaim of a killed process

2019-04-11 Thread Suren Baghdasaryan
On Thu, Apr 11, 2019 at 5:16 AM Michal Hocko wrote: > > On Thu 11-04-19 07:51:21, Rik van Riel wrote: > > On Wed, 2019-04-10 at 18:43 -0700, Suren Baghdasaryan via Lsf-pc wrote: > > > The time to kill a process and free its memory can be critical when > > > the > > > killing was done to prevent

Re: [RFC 0/2] opportunistic memory reclaim of a killed process

2019-04-11 Thread Suren Baghdasaryan
Thanks for the feedback! On Thu, Apr 11, 2019 at 3:51 AM Michal Hocko wrote: > > On Wed 10-04-19 18:43:51, Suren Baghdasaryan wrote: > [...] > > Proposed solution uses existing oom-reaper thread to increase memory > > reclaim rate of a killed process and to make this rate more deterministic. > >

Re: [RFC 0/2] opportunistic memory reclaim of a killed process

2019-04-11 Thread Sandeep Patil
On Thu, Apr 11, 2019 at 12:51:11PM +0200, Michal Hocko wrote: > On Wed 10-04-19 18:43:51, Suren Baghdasaryan wrote: > [...] > > Proposed solution uses existing oom-reaper thread to increase memory > > reclaim rate of a killed process and to make this rate more deterministic. > > By no means the

Re: [RFC 0/2] opportunistic memory reclaim of a killed process

2019-04-11 Thread Joel Fernandes
On Thu, Apr 11, 2019 at 6:51 AM Michal Hocko wrote: > > On Wed 10-04-19 18:43:51, Suren Baghdasaryan wrote: > [...] > > Proposed solution uses existing oom-reaper thread to increase memory > > reclaim rate of a killed process and to make this rate more deterministic. > > By no means the proposed

Re: [Lsf-pc] [RFC 0/2] opportunistic memory reclaim of a killed process

2019-04-11 Thread Michal Hocko
On Thu 11-04-19 07:51:21, Rik van Riel wrote: > On Wed, 2019-04-10 at 18:43 -0700, Suren Baghdasaryan via Lsf-pc wrote: > > The time to kill a process and free its memory can be critical when > > the > > killing was done to prevent memory shortages affecting system > > responsiveness. > > The OOM

Re: [Lsf-pc] [RFC 0/2] opportunistic memory reclaim of a killed process

2019-04-11 Thread Rik van Riel
On Wed, 2019-04-10 at 18:43 -0700, Suren Baghdasaryan via Lsf-pc wrote: > The time to kill a process and free its memory can be critical when > the > killing was done to prevent memory shortages affecting system > responsiveness. The OOM killer is fickle, and often takes a fairly long time to

Re: [RFC 0/2] opportunistic memory reclaim of a killed process

2019-04-11 Thread Michal Hocko
On Wed 10-04-19 18:43:51, Suren Baghdasaryan wrote: [...] > Proposed solution uses existing oom-reaper thread to increase memory > reclaim rate of a killed process and to make this rate more deterministic. > By no means the proposed solution is considered the best and was chosen > because it was

[RFC 0/2] opportunistic memory reclaim of a killed process

2019-04-10 Thread Suren Baghdasaryan
The time to kill a process and free its memory can be critical when the killing was done to prevent memory shortages affecting system responsiveness. In the case of Android, where processes can be restarted easily, killing a less important background process is preferred to delaying or throttling