Re: [PATCH 02/09] memcg: make inactive_anon_is_low()



| +static void mem_cgroup_set_inactive_ratio(struct mem_cgroup *memcg)
| +{
| + unsigned int gb, ratio;
| +
| + gb = res_counter_read_u64(&memcg->res, RES_LIMIT) >> 30;
| + ratio = int_sqrt(10 * gb);
| + if (!ratio)
| + ratio = 1;

Hi Kosaki,

maybe better would be

gb = ...;
if (gb) {
ratio = int_sqrt(10 * gb);
} else
ratio = 1;


Will fix.
Thanks.

Actually, setup_per_zone_inactive_ratio() (it calcule for global
reclaim) also have the same non-easy review thning.

I also fix it later.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/



Relevant Pages

  • Re: Getting video burned to DVD in correct ratio
    ... > problem for which there is no fix. ... > ratio is the magic phrase I needed. ... you have Toast converting from iMovie DV to MPEG-2) and then use Toast ... I have used Toast to burn MPEG-2s to a DVD that I ...
    (comp.sys.mac.apps)
  • Re: Java Gurus Help!
    ... I need to fix something and I estimate that the time required to fix it ... The key is to configure your formatter to do thing exactly as you ... I think you will be shocked how high the ratio can be. ... The IntelliJ and Eclipse also have reordering. ...
    (comp.lang.java.help)
  • Re: 16:9 aspect ratio and StarTrek movie in Blu Ray
    ... > Hopefully, someday, they say on the Blu-Ray listing which aspect ratio ... "I *bought* all that screen real estate, I damn well will USE all that ... My HDTV setting has been left alone since day one. ... So if the Black bars really annoy you, YOU CAN ADJUST THAT HDTV TO FIX IT you could say. ...
    (alt.tv.tech.hdtv)
  • Re: Feck!! New Pan HDTV has developed line of stuck pixels!! Fixable?
    ... Today I turned it on and noticed a very thin "line" ... Anyway to fix myself.... ... dashes on the edge of the screen, ... ratio to 16:9 and see if it goes away. ...
    (alt.tv.tech.hdtv)
  • Re: Help with mencoder mpg to avi changes aspect
    ... But when I want to fix the aspect ratio of an avi, ... # Changes the incorrect aspect ratio from avi files. ... Paulo Roma Cavalcanti ...
    (Fedora)