linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: "zbestahu" <zbestahu@aliyun.com>
To: Michal Hocko <mhocko@kernel.org>
Cc: akpm <akpm@linux-foundation.org>, minchan <minchan@kernel.org>,
	linux-mm <linux-mm@kvack.org>, Yue Hu <huyue2@coolpad.com>,
	Anton Vorontsov <anton.vorontsov@linaro.org>
Subject: Re: Re:[PATCH] mm: vmpressure: simplify pressure ratio calculation
Date: Tue, 04 Jul 2017 21:43:39 +0800	[thread overview]
Message-ID: <91b685c4-acee-4ecd-9176-ab95a7172cac.zbestahu@aliyun.com> (raw)

Michal wrote:
> > the existing percent
> > calculation using scale should be about rounding to intege, it
> > seems to be redundant, we can calculate it directly just like
> > "pressure = not_relaimed * 100 / scanned", no rounding issue. And
> > it's also better because of saving several arithmetic operations.

> and you haven't explained why that change is so much better to change
> the behavior.

it removes 3 below arithmetic instructions so it should be running faster.
add: scanned + reclaimed
mul: scale * reclaimed
udiv: reclaimed * scale /scanned

             reply	other threads:[~2017-07-04 13:43 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-07-04 13:43 zbestahu [this message]
2017-07-04 13:54 ` Re:[PATCH] mm: vmpressure: simplify pressure ratio calculation Michal Hocko
  -- strict thread matches above, loose matches on Subject: below --
2017-07-04 12:59 zbestahu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=91b685c4-acee-4ecd-9176-ab95a7172cac.zbestahu@aliyun.com \
    --to=zbestahu@aliyun.com \
    --cc=akpm@linux-foundation.org \
    --cc=anton.vorontsov@linaro.org \
    --cc=huyue2@coolpad.com \
    --cc=linux-mm@kvack.org \
    --cc=mhocko@kernel.org \
    --cc=minchan@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).