linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Shakeel Butt <shakeelb@google.com>
To: josh@joshtriplett.org
Cc: Kirill Tkhai <ktkhai@virtuozzo.com>,
	Michal Hocko <mhocko@kernel.org>,
	Andrew Morton <akpm@linux-foundation.org>,
	gregkh@linuxfoundation.org, rafael@kernel.org,
	Alexander Viro <viro@zeniv.linux.org.uk>,
	"Darrick J. Wong" <darrick.wong@oracle.com>,
	Paul McKenney <paulmck@linux.vnet.ibm.com>,
	Steven Rostedt <rostedt@goodmis.org>,
	mathieu.desnoyers@efficios.com, jiangshanlai@gmail.com,
	Hugh Dickins <hughd@google.com>,
	shuah@kernel.org, robh@kernel.org, ulf.hansson@linaro.org,
	aspriel@gmail.com, vivek.gautam@codeaurora.org,
	robin.murphy@arm.com, joe@perches.com,
	heikki.krogerus@linux.intel.com,
	Stephen Rothwell <sfr@canb.auug.org.au>,
	Vladimir Davydov <vdavydov.dev@gmail.com>,
	Chris Wilson <chris@chris-wilson.co.uk>,
	Tetsuo Handa <penguin-kernel@i-love.sakura.ne.jp>,
	Andrey Ryabinin <aryabinin@virtuozzo.com>,
	Matthew Wilcox <willy@infradead.org>,
	Huang Ying <ying.huang@intel.com>,
	jbacik@fb.com, Ingo Molnar <mingo@kernel.org>,
	mhiramat@kernel.org, LKML <linux-kernel@vger.kernel.org>,
	linux-fsdevel <linux-fsdevel@vger.kernel.org>,
	Linux MM <linux-mm@kvack.org>
Subject: Re: [PATCH RFC 01/10] rcu: Make CONFIG_SRCU unconditionally enabled
Date: Wed, 8 Aug 2018 16:02:29 -0700	[thread overview]
Message-ID: <CALvZod7C_jcNc=J0wg_wnCa2fkCjHhjoV1G8oKAmivRbvgQWxg@mail.gmail.com> (raw)
In-Reply-To: <20180808180152.GA2480@localhost>

On Wed, Aug 8, 2018 at 11:02 AM Josh Triplett <josh@joshtriplett.org> wrote:
>
> On Wed, Aug 08, 2018 at 07:30:13PM +0300, Kirill Tkhai wrote:
> > On 08.08.2018 19:23, Kirill Tkhai wrote:
> > > On 08.08.2018 19:13, Josh Triplett wrote:
> > >> On Wed, Aug 08, 2018 at 01:17:44PM +0300, Kirill Tkhai wrote:
> > >>> On 08.08.2018 10:20, Michal Hocko wrote:
> > >>>> On Tue 07-08-18 18:37:36, Kirill Tkhai wrote:
> > >>>>> This patch kills all CONFIG_SRCU defines and
> > >>>>> the code under !CONFIG_SRCU.
> > >>>>
> > >>>> The last time somebody tried to do this there was a pushback due to
> > >>>> kernel tinyfication. So this should really give some numbers about the
> > >>>> code size increase. Also why can't we make this depend on MMU. Is
> > >>>> anybody else than the reclaim asking for unconditional SRCU usage?
> > >>>
> > >>> I don't know one. The size numbers (sparc64) are:
> > >>>
> > >>> $ size image.srcu.disabled
> > >>>    text      data     bss     dec     hex filename
> > >>> 5117546   8030506 1968104 15116156         e6a77c image.srcu.disabled
> > >>> $ size image.srcu.enabled
> > >>>    text      data     bss     dec     hex filename
> > >>> 5126175   8064346 1968104 15158625         e74d61 image.srcu.enabled
> > >>> The difference is: 15158625-15116156 = 42469 ~41Kb
> > >>
> > >> 41k is a *substantial* size increase. However, can you compare
> > >> tinyconfig with and without this patch? That may have a smaller change.
> > >
> > > $ size image.srcu.disabled
> > >    text        data     bss     dec     hex filename
> > > 1105900      195456   63232 1364588  14d26c image.srcu.disabled
> > >
> > > $ size image.srcu.enabled
> > >    text        data     bss     dec     hex filename
> > > 1106960      195528   63232 1365720  14d6d8 image.srcu.enabled
> > >
> > > 1365720-1364588 = 1132 ~ 1Kb
> >
> > 1Kb is not huge size. It looks as not a big price for writing generic code
> > for only case (now some places have CONFIG_SRCU and !CONFIG_SRCU variants,
> > e.g. drivers/base/core.c). What do you think?
>
> That's a little more reasonable than 41k, likely because of
> CONFIG_TINY_SRCU. That's still not ideal, though. And as far as I can
> tell, the *only* two pieces of core code that use SRCU are
> drivers/base/core.c and kernel/notifier.c, and the latter is exclusively
> code to use notifiers with SRCU, not notifiers wanting to use SRCU
> themselves. So, as far as I can tell, this would really just save a
> couple of small #ifdef sections in drivers/base/core.c, and I think
> those #ifdef sections could be simplified even further. That doesn't
> seem worth it at all.

Hi Josh, the motivation behind enabling SRCU is not to simplify the
code in drivers/base/core.c but rather not to introduce similar ifdefs
in mm/vmscan.c for shrinker traversals.

Shakeel

  reply	other threads:[~2018-08-08 23:02 UTC|newest]

Thread overview: 40+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-08-07 15:37 [PATCH RFC 00/10] Introduce lockless shrink_slab() Kirill Tkhai
2018-08-07 15:37 ` [PATCH RFC 01/10] rcu: Make CONFIG_SRCU unconditionally enabled Kirill Tkhai
2018-08-08  0:55   ` Steven Rostedt
2018-08-08  1:05   ` Stephen Rothwell
2018-08-08  9:46     ` Kirill Tkhai
2018-08-08  1:08   ` Stephen Rothwell
2018-08-08  9:59     ` Kirill Tkhai
2018-08-08 11:04       ` Stephen Rothwell
2018-08-08  7:20   ` Michal Hocko
2018-08-08 10:17     ` Kirill Tkhai
2018-08-08 10:27       ` Michal Hocko
2018-08-08 21:31         ` Dave Chinner
2018-08-09  0:07           ` Matthew Wilcox
2018-08-09  7:45             ` Greg KH
2018-08-09 10:22           ` Kirill Tkhai
2018-08-08 16:13       ` Josh Triplett
2018-08-08 16:23         ` Kirill Tkhai
2018-08-08 16:30           ` Kirill Tkhai
2018-08-08 18:01             ` Josh Triplett
2018-08-08 23:02               ` Shakeel Butt [this message]
2018-08-08 23:09                 ` Josh Triplett
2018-08-07 15:37 ` [PATCH RFC 02/10] mm: Make shrink_slab() lockless Kirill Tkhai
2018-08-08 11:51   ` Kirill Tkhai
2018-08-08 13:20     ` [PATCH RFC v2 " Kirill Tkhai
2018-08-09  7:14       ` Michal Hocko
2018-08-09  9:21         ` Kirill Tkhai
2018-08-09 10:37           ` Tetsuo Handa
2018-08-09 10:58             ` Kirill Tkhai
2018-08-09 11:23         ` Kirill Tkhai
2018-08-07 15:38 ` [PATCH RFC 03/10] mm: Convert shrinker_rwsem to mutex Kirill Tkhai
2018-08-07 15:38 ` [PATCH RFC 04/10] mm: Split unregister_shrinker() Kirill Tkhai
2018-08-07 15:38 ` [PATCH RFC 05/10] fs: Move list_lru_destroy() to destroy_super_work() Kirill Tkhai
2018-08-07 15:38 ` [PATCH RFC 06/10] fs: Shrink only (SB_ACTIVE|SB_BORN) superblocks in super_cache_scan() Kirill Tkhai
2018-08-07 15:38 ` [PATCH RFC 07/10] fs: Introduce struct super_operations::destroy_super() callback Kirill Tkhai
2018-08-07 15:39 ` [PATCH RFC 08/10] xfs: Introduce xfs_fs_destroy_super() Kirill Tkhai
2018-08-07 15:39 ` [PATCH RFC 09/10] shmem: Implement shmem_destroy_super() Kirill Tkhai
2018-08-07 15:39 ` [PATCH RFC 10/10] fs: Use unregister_shrinker_delayed_{initiate, finalize} for super_block shrinker Kirill Tkhai
2018-08-08  1:12 ` [PATCH RFC 00/10] Introduce lockless shrink_slab() Stephen Rothwell
2018-08-08  5:39   ` Shakeel Butt
2018-08-08 10:18     ` Kirill Tkhai

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='CALvZod7C_jcNc=J0wg_wnCa2fkCjHhjoV1G8oKAmivRbvgQWxg@mail.gmail.com' \
    --to=shakeelb@google.com \
    --cc=akpm@linux-foundation.org \
    --cc=aryabinin@virtuozzo.com \
    --cc=aspriel@gmail.com \
    --cc=chris@chris-wilson.co.uk \
    --cc=darrick.wong@oracle.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=heikki.krogerus@linux.intel.com \
    --cc=hughd@google.com \
    --cc=jbacik@fb.com \
    --cc=jiangshanlai@gmail.com \
    --cc=joe@perches.com \
    --cc=josh@joshtriplett.org \
    --cc=ktkhai@virtuozzo.com \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=mathieu.desnoyers@efficios.com \
    --cc=mhiramat@kernel.org \
    --cc=mhocko@kernel.org \
    --cc=mingo@kernel.org \
    --cc=paulmck@linux.vnet.ibm.com \
    --cc=penguin-kernel@i-love.sakura.ne.jp \
    --cc=rafael@kernel.org \
    --cc=robh@kernel.org \
    --cc=robin.murphy@arm.com \
    --cc=rostedt@goodmis.org \
    --cc=sfr@canb.auug.org.au \
    --cc=shuah@kernel.org \
    --cc=ulf.hansson@linaro.org \
    --cc=vdavydov.dev@gmail.com \
    --cc=viro@zeniv.linux.org.uk \
    --cc=vivek.gautam@codeaurora.org \
    --cc=willy@infradead.org \
    --cc=ying.huang@intel.com \
    /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).