lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CALvZod6iCE8W51m2N704GQ_ML==J76SU6e9w7RCFE2+Vd+Vjaw@mail.gmail.com>
Date:   Thu, 19 Jul 2018 09:11:22 -0700
From:   Shakeel Butt <shakeelb@...gle.com>
To:     Kirill Tkhai <ktkhai@...tuozzo.com>
Cc:     Andrew Morton <akpm@...ux-foundation.org>,
        Vladimir Davydov <vdavydov.dev@...il.com>,
        Michal Hocko <mhocko@...e.com>,
        Tetsuo Handa <penguin-kernel@...ove.sakura.ne.jp>,
        Linux MM <linux-mm@...ck.org>,
        LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] mm: Cleanup in do_shrink_slab()

On Thu, Jul 19, 2018 at 9:04 AM Kirill Tkhai <ktkhai@...tuozzo.com> wrote:
>
> Group long variables together to minimize number of occupied lines
> and place all definitions in back Christmas tree order. Also,
> simplify expression around batch_size: use all power of C language!
>
> Signed-off-by: Kirill Tkhai <ktkhai@...tuozzo.com>

Reviewed-by: Shakeel Butt <shakeelb@...gle.com>

> ---
>  mm/vmscan.c |   11 +++--------
>  1 file changed, 3 insertions(+), 8 deletions(-)
>
> diff --git a/mm/vmscan.c b/mm/vmscan.c
> index 9918bfc1d2f9..636657213b9b 100644
> --- a/mm/vmscan.c
> +++ b/mm/vmscan.c
> @@ -445,16 +445,11 @@ EXPORT_SYMBOL(unregister_shrinker);
>  static unsigned long do_shrink_slab(struct shrink_control *shrinkctl,
>                                     struct shrinker *shrinker, int priority)
>  {
> -       unsigned long freed = 0;
> +       long total_scan, freeable, nr, new_nr, next_deferred, scanned = 0;
> +       long batch_size = shrinker->batch ? : SHRINK_BATCH;
>         unsigned long long delta;
> -       long total_scan;
> -       long freeable;
> -       long nr;
> -       long new_nr;
>         int nid = shrinkctl->nid;
> -       long batch_size = shrinker->batch ? shrinker->batch
> -                                         : SHRINK_BATCH;
> -       long scanned = 0, next_deferred;
> +       unsigned long freed = 0;
>
>         freeable = shrinker->count_objects(shrinker, shrinkctl);
>         if (freeable == 0 || freeable == SHRINK_EMPTY)
>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ