All of lore.kernel.org
 help / color / mirror / Atom feed
* turn off lowmemorykiller when running IGT on Android?
@ 2014-09-18 15:42 Gore, Tim
  2014-09-18 18:57 ` Daniel Vetter
  0 siblings, 1 reply; 5+ messages in thread
From: Gore, Tim @ 2014-09-18 15:42 UTC (permalink / raw)
  To: intel-gfx@lists.freedesktop.org; +Cc: Sharp, Robert, Joncour, Yann

Hi All.
   After some pain trying to resolve an IGT test getting killed by the Android
Lowmemorykiller,  it seems to me that in the context of the IGT tests we
just don't need (or want) the android low memory killer. The Linux memory
management and oom functions are perfectly adequate.
Rob Becket kindly pointed me to a module parameter I can adjust to effectively
stop the low memory killer from killing anything and I would like to suggest
that we use this with all IGT tests when run on Android.

   echo "9999" >  /sys/module/lowmemorykiller/parameters/adj

This is easily done from the console but I think we should put it in igt_core.c
So that it does not get forgotten, perhaps by adding it to the
omm_adjust_for_doom function (within #ifdef ANDROID of course).
What do people think?

  Tim Gore

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: turn off lowmemorykiller when running IGT on Android?
  2014-09-18 15:42 turn off lowmemorykiller when running IGT on Android? Gore, Tim
@ 2014-09-18 18:57 ` Daniel Vetter
  2014-09-19  8:21   ` Gore, Tim
  0 siblings, 1 reply; 5+ messages in thread
From: Daniel Vetter @ 2014-09-18 18:57 UTC (permalink / raw)
  To: Gore, Tim; +Cc: intel-gfx@lists.freedesktop.org, Sharp, Robert, Joncour, Yann

On Thu, Sep 18, 2014 at 5:42 PM, Gore, Tim <tim.gore@intel.com> wrote:
> Hi All.
>    After some pain trying to resolve an IGT test getting killed by the Android
> Lowmemorykiller,  it seems to me that in the context of the IGT tests we
> just don't need (or want) the android low memory killer. The Linux memory
> management and oom functions are perfectly adequate.
> Rob Becket kindly pointed me to a module parameter I can adjust to effectively
> stop the low memory killer from killing anything and I would like to suggest
> that we use this with all IGT tests when run on Android.
>
>    echo "9999" >  /sys/module/lowmemorykiller/parameters/adj
>
> This is easily done from the console but I think we should put it in igt_core.c
> So that it does not get forgotten, perhaps by adding it to the
> omm_adjust_for_doom function (within #ifdef ANDROID of course).
> What do people think?

Adding this to igt_core with a cleanup handler sounds like a plan. And
really, the android lowmemkiller is just broken for aiming at
processes owned by root, but apparently we can't fix that.

But please add this _without_ and #ifdef ANDROID since there are linux
distros out there (*cough* ubuntu *cough*) which for incomprehensible
reasons add everything under CONFIG_ANDROID ...
-Daniel
-- 
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: turn off lowmemorykiller when running IGT on Android?
  2014-09-18 18:57 ` Daniel Vetter
@ 2014-09-19  8:21   ` Gore, Tim
  2014-09-19 15:52     ` Daniel Vetter
  0 siblings, 1 reply; 5+ messages in thread
From: Gore, Tim @ 2014-09-19  8:21 UTC (permalink / raw)
  To: Daniel Vetter
  Cc: intel-gfx@lists.freedesktop.org, Sharp, Robert, Joncour, Yann



> -----Original Message-----
> From: daniel.vetter@ffwll.ch [mailto:daniel.vetter@ffwll.ch] On Behalf Of
> Daniel Vetter
> Sent: Thursday, September 18, 2014 7:57 PM
> To: Gore, Tim
> Cc: intel-gfx@lists.freedesktop.org; Gardiner, Kelvin; Joncour, Yann; Sharp,
> Robert; Daniel, Thomas
> Subject: Re: turn off lowmemorykiller when running IGT on Android?
> 
> On Thu, Sep 18, 2014 at 5:42 PM, Gore, Tim <tim.gore@intel.com> wrote:
> > Hi All.
> >    After some pain trying to resolve an IGT test getting killed by the
> > Android Lowmemorykiller,  it seems to me that in the context of the
> > IGT tests we just don't need (or want) the android low memory killer.
> > The Linux memory management and oom functions are perfectly
> adequate.
> > Rob Becket kindly pointed me to a module parameter I can adjust to
> > effectively stop the low memory killer from killing anything and I
> > would like to suggest that we use this with all IGT tests when run on
> Android.
> >
> >    echo "9999" >  /sys/module/lowmemorykiller/parameters/adj
> >
> > This is easily done from the console but I think we should put it in
> > igt_core.c So that it does not get forgotten, perhaps by adding it to
> > the omm_adjust_for_doom function (within #ifdef ANDROID of course).
> > What do people think?
> 
> Adding this to igt_core with a cleanup handler sounds like a plan. And really,
> the android lowmemkiller is just broken for aiming at processes owned by
> root, but apparently we can't fix that.
> 
> But please add this _without_ and #ifdef ANDROID since there are linux
> distros out there (*cough* ubuntu *cough*) which for incomprehensible
> reasons add everything under CONFIG_ANDROID ...
> -Daniel
> --

Thanks Daniel, as you say it needs to be cleaned up afterwards. I can avoid the
#ifdef ANDROID, but I didn't understand the issue; what do you mean when you
Say "add everything under CONFIG_ANDROID"? There are already a couple of
Places where we use #ifdef ANDROID in the IGT code (drmtest.h and ralloc.c).
Do these also represent a problem.

 Tim

> Daniel Vetter
> Software Engineer, Intel Corporation
> +41 (0) 79 365 57 48 - http://blog.ffwll.ch

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: turn off lowmemorykiller when running IGT on Android?
  2014-09-19  8:21   ` Gore, Tim
@ 2014-09-19 15:52     ` Daniel Vetter
  2014-09-19 16:01       ` Gore, Tim
  0 siblings, 1 reply; 5+ messages in thread
From: Daniel Vetter @ 2014-09-19 15:52 UTC (permalink / raw)
  To: Gore, Tim; +Cc: Sharp, Robert, intel-gfx@lists.freedesktop.org, Joncour, Yann

On Fri, Sep 19, 2014 at 08:21:49AM +0000, Gore, Tim wrote:
> 
> 
> > -----Original Message-----
> > From: daniel.vetter@ffwll.ch [mailto:daniel.vetter@ffwll.ch] On Behalf Of
> > Daniel Vetter
> > Sent: Thursday, September 18, 2014 7:57 PM
> > To: Gore, Tim
> > Cc: intel-gfx@lists.freedesktop.org; Gardiner, Kelvin; Joncour, Yann; Sharp,
> > Robert; Daniel, Thomas
> > Subject: Re: turn off lowmemorykiller when running IGT on Android?
> > 
> > On Thu, Sep 18, 2014 at 5:42 PM, Gore, Tim <tim.gore@intel.com> wrote:
> > > Hi All.
> > >    After some pain trying to resolve an IGT test getting killed by the
> > > Android Lowmemorykiller,  it seems to me that in the context of the
> > > IGT tests we just don't need (or want) the android low memory killer.
> > > The Linux memory management and oom functions are perfectly
> > adequate.
> > > Rob Becket kindly pointed me to a module parameter I can adjust to
> > > effectively stop the low memory killer from killing anything and I
> > > would like to suggest that we use this with all IGT tests when run on
> > Android.
> > >
> > >    echo "9999" >  /sys/module/lowmemorykiller/parameters/adj
> > >
> > > This is easily done from the console but I think we should put it in
> > > igt_core.c So that it does not get forgotten, perhaps by adding it to
> > > the omm_adjust_for_doom function (within #ifdef ANDROID of course).
> > > What do people think?
> > 
> > Adding this to igt_core with a cleanup handler sounds like a plan. And really,
> > the android lowmemkiller is just broken for aiming at processes owned by
> > root, but apparently we can't fix that.
> > 
> > But please add this _without_ and #ifdef ANDROID since there are linux
> > distros out there (*cough* ubuntu *cough*) which for incomprehensible
> > reasons add everything under CONFIG_ANDROID ...
> > -Daniel
> > --
> 
> Thanks Daniel, as you say it needs to be cleaned up afterwards. I can avoid the
> #ifdef ANDROID, but I didn't understand the issue; what do you mean when you
> Say "add everything under CONFIG_ANDROID"? There are already a couple of
> Places where we use #ifdef ANDROID in the IGT code (drmtest.h and ralloc.c).
> Do these also represent a problem.

CONFIG_ANDROID from the kernel configuration, not igt. So it's possible to
have the lowmemorykiller outside of an android build enabled, which means
we need to check for it at runtime and not compile-time here in igt.

All the other #ifdefs are for differences in libc afaics, so make sense
as compile-time decisions.
-Daniel
-- 
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: turn off lowmemorykiller when running IGT on Android?
  2014-09-19 15:52     ` Daniel Vetter
@ 2014-09-19 16:01       ` Gore, Tim
  0 siblings, 0 replies; 5+ messages in thread
From: Gore, Tim @ 2014-09-19 16:01 UTC (permalink / raw)
  To: Daniel Vetter
  Cc: intel-gfx@lists.freedesktop.org, Sharp, Robert, Joncour, Yann



> -----Original Message-----
> From: Daniel Vetter [mailto:daniel.vetter@ffwll.ch] On Behalf Of Daniel
> Vetter
> Sent: Friday, September 19, 2014 4:52 PM
> To: Gore, Tim
> Cc: Daniel Vetter; intel-gfx@lists.freedesktop.org; Gardiner, Kelvin; Joncour,
> Yann; Sharp, Robert; Daniel, Thomas
> Subject: Re: turn off lowmemorykiller when running IGT on Android?
> 
> On Fri, Sep 19, 2014 at 08:21:49AM +0000, Gore, Tim wrote:
> >
> >
> > > -----Original Message-----
> > > From: daniel.vetter@ffwll.ch [mailto:daniel.vetter@ffwll.ch] On
> > > Behalf Of Daniel Vetter
> > > Sent: Thursday, September 18, 2014 7:57 PM
> > > To: Gore, Tim
> > > Cc: intel-gfx@lists.freedesktop.org; Gardiner, Kelvin; Joncour,
> > > Yann; Sharp, Robert; Daniel, Thomas
> > > Subject: Re: turn off lowmemorykiller when running IGT on Android?
> > >
> > > On Thu, Sep 18, 2014 at 5:42 PM, Gore, Tim <tim.gore@intel.com> wrote:
> > > > Hi All.
> > > >    After some pain trying to resolve an IGT test getting killed by
> > > > the Android Lowmemorykiller,  it seems to me that in the context
> > > > of the IGT tests we just don't need (or want) the android low memory
> killer.
> > > > The Linux memory management and oom functions are perfectly
> > > adequate.
> > > > Rob Becket kindly pointed me to a module parameter I can adjust to
> > > > effectively stop the low memory killer from killing anything and I
> > > > would like to suggest that we use this with all IGT tests when run
> > > > on
> > > Android.
> > > >
> > > >    echo "9999" >  /sys/module/lowmemorykiller/parameters/adj
> > > >
> > > > This is easily done from the console but I think we should put it
> > > > in igt_core.c So that it does not get forgotten, perhaps by adding
> > > > it to the omm_adjust_for_doom function (within #ifdef ANDROID of
> course).
> > > > What do people think?
> > >
> > > Adding this to igt_core with a cleanup handler sounds like a plan.
> > > And really, the android lowmemkiller is just broken for aiming at
> > > processes owned by root, but apparently we can't fix that.
> > >
> > > But please add this _without_ and #ifdef ANDROID since there are
> > > linux distros out there (*cough* ubuntu *cough*) which for
> > > incomprehensible reasons add everything under CONFIG_ANDROID ...
> > > -Daniel
> > > --
> >
> > Thanks Daniel, as you say it needs to be cleaned up afterwards. I can
> > avoid the #ifdef ANDROID, but I didn't understand the issue; what do
> > you mean when you Say "add everything under CONFIG_ANDROID"?
> There are
> > already a couple of Places where we use #ifdef ANDROID in the IGT code
> (drmtest.h and ralloc.c).
> > Do these also represent a problem.
> 
> CONFIG_ANDROID from the kernel configuration, not igt. So it's possible to
> have the lowmemorykiller outside of an android build enabled, which means
> we need to check for it at runtime and not compile-time here in igt.
> 
> All the other #ifdefs are for differences in libc afaics, so make sense as
> compile-time decisions.
> -Daniel

OK, I'll try to make this a runtime check
  Tim

> --
> Daniel Vetter
> Software Engineer, Intel Corporation
> +41 (0) 79 365 57 48 - http://blog.ffwll.ch

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2014-09-19 16:02 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-09-18 15:42 turn off lowmemorykiller when running IGT on Android? Gore, Tim
2014-09-18 18:57 ` Daniel Vetter
2014-09-19  8:21   ` Gore, Tim
2014-09-19 15:52     ` Daniel Vetter
2014-09-19 16:01       ` Gore, Tim

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.