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: <Y9PEoOAxE1hlnH5o@dhcp22.suse.cz>
Date:   Fri, 27 Jan 2023 13:33:36 +0100
From:   Michal Hocko <mhocko@...e.com>
To:     Hyeonggon Yoo <42.hyeyoo@...il.com>
Cc:     Vlastimil Babka <vbabka@...e.cz>,
        Andrew Morton <akpm@...ux-foundation.org>,
        Christoph Lameter <cl@...ux.com>,
        Pekka Enberg <penberg@...nel.org>,
        David Rientjes <rientjes@...gle.com>,
        Joonsoo Kim <iamjoonsoo.kim@....com>,
        Roman Gushchin <roman.gushchin@...ux.dev>,
        Ingo Molnar <mingo@...hat.com>,
        Johannes Weiner <hannes@...xchg.org>,
        Shakeel Butt <shakeelb@...gle.com>,
        Muchun Song <muchun.song@...ux.dev>,
        Matthew Wilcox <willy@...radead.org>, linux-mm@...ck.org,
        linux-kernel@...r.kernel.org,
        Peter Zijlstra <peterz@...radead.org>,
        Juri Lelli <juri.lelli@...hat.com>,
        Vincent Guittot <vincent.guittot@...aro.org>,
        Dietmar Eggemann <dietmar.eggemann@....com>,
        Steven Rostedt <rostedt@...dmis.org>,
        Ben Segall <bsegall@...gle.com>,
        Mel Gorman <mgorman@...hsingularity.net>,
        Daniel Bristot de Oliveira <bristot@...hat.com>,
        Valentin Schneider <vschneid@...hat.com>,
        Dennis Zhou <dennis@...nel.org>, Tejun Heo <tj@...nel.org>
Subject: Re: [PATCH mm-unstable] lib/Kconfig.debug: do not enable
 DEBUG_PREEMPT by default

On Fri 27-01-23 20:43:20, Hyeonggon Yoo wrote:
> On Wed, Jan 25, 2023 at 10:51:05AM +0100, Michal Hocko wrote:
> > On Thu 26-01-23 00:41:15, Hyeonggon Yoo wrote:
> > [...]
> > > > Do you happen to have any perf data collected during those runs? I
> > > > would be interested in the memcg side of things. Maybe we can do
> > > > something better there.
> > > 
> > > Yes, below is performance data I've collected.
> > > 
> > > 6.1.8-debug-preempt-dirty
> > > =========================
> > >   Overhead  Command       Shared Object     Symbol
> > > +    9.14%  hackbench        [kernel.vmlinux]  [k] check_preemption_disabled
> > 
> > Thanks! Could you just add callers that are showing in the profile for
> > this call please?
> 
> -   14.56%     9.14%  hackbench        [kernel.vmlinux]  [k] check_preemption_disabled                          
>    - 6.37% check_preemption_disabled                                                                            
>       + 3.48% mod_objcg_state                                                                                   
>       + 1.10% obj_cgroup_charge                                                                                 
>         1.02% refill_obj_stock                                                                                  
>      0.67% memcg_slab_post_alloc_hook                                                                           
>      0.58% mod_objcg_state      
> 
> According to perf, many memcg functions call this function
> and that's because __this_cpu_xxxx checks if preemption is disabled.

OK, I see. Thanks! I was thinking whether we can optimize for that bu
IIUC __this_cpu* is already an optimized form. mod_objcg_state is
already called with local_lock so raw_cpu* could be used in that path
but I guess this is not really worth just to optimize for a debug
compile option to benefit.
-- 
Michal Hocko
SUSE Labs

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ