Re: [RFC v2] prctl: prctl(PR_SET_IDLE, PR_IDLE_MODE_KILLME), for stateless idle loops

2017-11-22 Thread peter enderborg
On 11/03/2017 07:35 AM, Shawn Landden wrote: > It is common for services to be stateless around their main event loop. > If a process sets PR_SET_IDLE to PR_IDLE_MODE_KILLME then it > signals to the kernel that epoll_wait() and friends may not complete, > and the kernel may send SIGKILL if

Re: [RFC v2] prctl: prctl(PR_SET_IDLE, PR_IDLE_MODE_KILLME), for stateless idle loops

2017-11-22 Thread peter enderborg
On 11/03/2017 07:35 AM, Shawn Landden wrote: > It is common for services to be stateless around their main event loop. > If a process sets PR_SET_IDLE to PR_IDLE_MODE_KILLME then it > signals to the kernel that epoll_wait() and friends may not complete, > and the kernel may send SIGKILL if

Re: [RFC v2] prctl: prctl(PR_SET_IDLE, PR_IDLE_MODE_KILLME), for stateless idle loops

2017-11-20 Thread Michal Hocko
On Mon 20-11-17 20:48:10, Shawn Landden wrote: > On Mon, Nov 20, 2017 at 12:35 AM, Michal Hocko wrote: > > On Fri 17-11-17 20:45:03, Shawn Landden wrote: > >> On Fri, Nov 3, 2017 at 2:09 AM, Michal Hocko wrote: > >> > >> > On Thu 02-11-17 23:35:44, Shawn

Re: [RFC v2] prctl: prctl(PR_SET_IDLE, PR_IDLE_MODE_KILLME), for stateless idle loops

2017-11-20 Thread Michal Hocko
On Mon 20-11-17 20:48:10, Shawn Landden wrote: > On Mon, Nov 20, 2017 at 12:35 AM, Michal Hocko wrote: > > On Fri 17-11-17 20:45:03, Shawn Landden wrote: > >> On Fri, Nov 3, 2017 at 2:09 AM, Michal Hocko wrote: > >> > >> > On Thu 02-11-17 23:35:44, Shawn Landden wrote: > >> > > It is common for

Re: [RFC v2] prctl: prctl(PR_SET_IDLE, PR_IDLE_MODE_KILLME), for stateless idle loops

2017-11-20 Thread Shawn Landden
On Mon, Nov 20, 2017 at 12:35 AM, Michal Hocko wrote: > On Fri 17-11-17 20:45:03, Shawn Landden wrote: >> On Fri, Nov 3, 2017 at 2:09 AM, Michal Hocko wrote: >> >> > On Thu 02-11-17 23:35:44, Shawn Landden wrote: >> > > It is common for services to be

Re: [RFC v2] prctl: prctl(PR_SET_IDLE, PR_IDLE_MODE_KILLME), for stateless idle loops

2017-11-20 Thread Shawn Landden
On Mon, Nov 20, 2017 at 12:35 AM, Michal Hocko wrote: > On Fri 17-11-17 20:45:03, Shawn Landden wrote: >> On Fri, Nov 3, 2017 at 2:09 AM, Michal Hocko wrote: >> >> > On Thu 02-11-17 23:35:44, Shawn Landden wrote: >> > > It is common for services to be stateless around their main event loop. >> >

Re: [RFC v2] prctl: prctl(PR_SET_IDLE, PR_IDLE_MODE_KILLME), for stateless idle loops

2017-11-20 Thread Michal Hocko
On Fri 17-11-17 20:45:03, Shawn Landden wrote: > On Fri, Nov 3, 2017 at 2:09 AM, Michal Hocko wrote: > > > On Thu 02-11-17 23:35:44, Shawn Landden wrote: > > > It is common for services to be stateless around their main event loop. > > > If a process sets PR_SET_IDLE to

Re: [RFC v2] prctl: prctl(PR_SET_IDLE, PR_IDLE_MODE_KILLME), for stateless idle loops

2017-11-20 Thread Michal Hocko
On Fri 17-11-17 20:45:03, Shawn Landden wrote: > On Fri, Nov 3, 2017 at 2:09 AM, Michal Hocko wrote: > > > On Thu 02-11-17 23:35:44, Shawn Landden wrote: > > > It is common for services to be stateless around their main event loop. > > > If a process sets PR_SET_IDLE to PR_IDLE_MODE_KILLME then

Re: [RFC v2] prctl: prctl(PR_SET_IDLE, PR_IDLE_MODE_KILLME), for stateless idle loops

2017-11-18 Thread Matthew Wilcox
On Fri, Nov 17, 2017 at 08:45:03PM -0800, Shawn Landden wrote: > On Fri, Nov 3, 2017 at 2:09 AM, Michal Hocko wrote: > > On Thu 02-11-17 23:35:44, Shawn Landden wrote: > > > 16 bytes per process is kinda spendy, but I want to keep > > > lru behavior, which mem_score_adj does

Re: [RFC v2] prctl: prctl(PR_SET_IDLE, PR_IDLE_MODE_KILLME), for stateless idle loops

2017-11-18 Thread Matthew Wilcox
On Fri, Nov 17, 2017 at 08:45:03PM -0800, Shawn Landden wrote: > On Fri, Nov 3, 2017 at 2:09 AM, Michal Hocko wrote: > > On Thu 02-11-17 23:35:44, Shawn Landden wrote: > > > 16 bytes per process is kinda spendy, but I want to keep > > > lru behavior, which mem_score_adj does not allow. When a

Re: [RFC v2] prctl: prctl(PR_SET_IDLE, PR_IDLE_MODE_KILLME), for stateless idle loops

2017-11-18 Thread Shawn Landden
On Fri, Nov 3, 2017 at 2:09 AM, Michal Hocko wrote: > On Thu 02-11-17 23:35:44, Shawn Landden wrote: >> 16 bytes per process is kinda spendy, but I want to keep >> lru behavior, which mem_score_adj does not allow. When a supervisor, >> like Android's user input is keeping track

Re: [RFC v2] prctl: prctl(PR_SET_IDLE, PR_IDLE_MODE_KILLME), for stateless idle loops

2017-11-18 Thread Shawn Landden
On Fri, Nov 3, 2017 at 2:09 AM, Michal Hocko wrote: > On Thu 02-11-17 23:35:44, Shawn Landden wrote: >> 16 bytes per process is kinda spendy, but I want to keep >> lru behavior, which mem_score_adj does not allow. When a supervisor, >> like Android's user input is keeping track this can be done

Re: [RFC v2] prctl: prctl(PR_SET_IDLE, PR_IDLE_MODE_KILLME), for stateless idle loops

2017-11-15 Thread Pavel Machek
Hi! > It is common for services to be stateless around their main event loop. > If a process sets PR_SET_IDLE to PR_IDLE_MODE_KILLME then it > signals to the kernel that epoll_wait() and friends may not complete, > and the kernel may send SIGKILL if resources get tight. > > See my systemd patch:

Re: [RFC v2] prctl: prctl(PR_SET_IDLE, PR_IDLE_MODE_KILLME), for stateless idle loops

2017-11-15 Thread Pavel Machek
Hi! > It is common for services to be stateless around their main event loop. > If a process sets PR_SET_IDLE to PR_IDLE_MODE_KILLME then it > signals to the kernel that epoll_wait() and friends may not complete, > and the kernel may send SIGKILL if resources get tight. > > See my systemd patch:

Re: [RFC v2] prctl: prctl(PR_SET_IDLE, PR_IDLE_MODE_KILLME), for stateless idle loops

2017-11-03 Thread Michal Hocko
On Thu 02-11-17 23:35:44, Shawn Landden wrote: > It is common for services to be stateless around their main event loop. > If a process sets PR_SET_IDLE to PR_IDLE_MODE_KILLME then it > signals to the kernel that epoll_wait() and friends may not complete, > and the kernel may send SIGKILL if

Re: [RFC v2] prctl: prctl(PR_SET_IDLE, PR_IDLE_MODE_KILLME), for stateless idle loops

2017-11-03 Thread Michal Hocko
On Thu 02-11-17 23:35:44, Shawn Landden wrote: > It is common for services to be stateless around their main event loop. > If a process sets PR_SET_IDLE to PR_IDLE_MODE_KILLME then it > signals to the kernel that epoll_wait() and friends may not complete, > and the kernel may send SIGKILL if

[RFC v2] prctl: prctl(PR_SET_IDLE, PR_IDLE_MODE_KILLME), for stateless idle loops

2017-11-03 Thread Shawn Landden
It is common for services to be stateless around their main event loop. If a process sets PR_SET_IDLE to PR_IDLE_MODE_KILLME then it signals to the kernel that epoll_wait() and friends may not complete, and the kernel may send SIGKILL if resources get tight. See my systemd patch:

[RFC v2] prctl: prctl(PR_SET_IDLE, PR_IDLE_MODE_KILLME), for stateless idle loops

2017-11-03 Thread Shawn Landden
It is common for services to be stateless around their main event loop. If a process sets PR_SET_IDLE to PR_IDLE_MODE_KILLME then it signals to the kernel that epoll_wait() and friends may not complete, and the kernel may send SIGKILL if resources get tight. See my systemd patch: