From: Sergey Senozhatsky <sergey.senozhatsky.work@gmail.com>
To: Christoph Hellwig <hch@infradead.org>
Cc: Sergey Senozhatsky <sergey.senozhatsky@gmail.com>,
Andrew Morton <akpm@linux-foundation.org>,
linux-mm@kvack.org, linux-kernel@vger.kernel.org,
Sergey Senozhatsky <sergey.senozhatsky.work@gmail.com>
Subject: Re: [PATCH 0/2] mm/shrinker: make unregister_shrinker() less fragile
Date: Mon, 13 Jul 2015 15:52:53 +0900 [thread overview]
Message-ID: <20150713065253.GA811@swordfish> (raw)
In-Reply-To: <20150713063341.GA24167@infradead.org>
On (07/12/15 23:33), Christoph Hellwig wrote:
> On Sun, Jul 12, 2015 at 11:47:32AM +0900, Sergey Senozhatsky wrote:
> > Yes, but the main difference here is that it seems that shrinker users
> > don't tend to treat shrinker registration failures as fatal errors and
> > just continue with shrinker functionality disabled. And it makes sense.
> >
> > (copy paste from https://lkml.org/lkml/2015/7/9/751)
> >
>
> I hearily disagree. It's not any less critical than other failures.
Why? In some sense, shrinker callbacks are just a way to be nice.
No one writes a driver just to be able to handle shrinker calls. An
ability to react to those calls is just additional option; it does
not directly affect or limit driver's functionality (at least, it
really should not).
> The right way forward is to handle register failure properly.
In other words, to
(a) keep a flag to signify that register was not successful
or
(b) look at ->shrinker.list.next or ->nr_deferred
or
(c) treat register failures as critical errors. (I sort of
disagree with you here).
-ss
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
WARNING: multiple messages have this Message-ID (diff)
From: Sergey Senozhatsky <sergey.senozhatsky.work@gmail.com>
To: Christoph Hellwig <hch@infradead.org>
Cc: Sergey Senozhatsky <sergey.senozhatsky@gmail.com>,
Andrew Morton <akpm@linux-foundation.org>,
linux-mm@kvack.org, linux-kernel@vger.kernel.org,
Sergey Senozhatsky <sergey.senozhatsky.work@gmail.com>
Subject: Re: [PATCH 0/2] mm/shrinker: make unregister_shrinker() less fragile
Date: Mon, 13 Jul 2015 15:52:53 +0900 [thread overview]
Message-ID: <20150713065253.GA811@swordfish> (raw)
In-Reply-To: <20150713063341.GA24167@infradead.org>
On (07/12/15 23:33), Christoph Hellwig wrote:
> On Sun, Jul 12, 2015 at 11:47:32AM +0900, Sergey Senozhatsky wrote:
> > Yes, but the main difference here is that it seems that shrinker users
> > don't tend to treat shrinker registration failures as fatal errors and
> > just continue with shrinker functionality disabled. And it makes sense.
> >
> > (copy paste from https://lkml.org/lkml/2015/7/9/751)
> >
>
> I hearily disagree. It's not any less critical than other failures.
Why? In some sense, shrinker callbacks are just a way to be nice.
No one writes a driver just to be able to handle shrinker calls. An
ability to react to those calls is just additional option; it does
not directly affect or limit driver's functionality (at least, it
really should not).
> The right way forward is to handle register failure properly.
In other words, to
(a) keep a flag to signify that register was not successful
or
(b) look at ->shrinker.list.next or ->nr_deferred
or
(c) treat register failures as critical errors. (I sort of
disagree with you here).
-ss
next prev parent reply other threads:[~2015-07-13 6:52 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-07-11 2:51 [PATCH 0/2] mm/shrinker: make unregister_shrinker() less fragile Sergey Senozhatsky
2015-07-11 2:51 ` Sergey Senozhatsky
2015-07-11 2:51 ` [PATCH 1/2] mm/shrinker: do not NULL dereference uninitialized shrinker Sergey Senozhatsky
2015-07-11 2:51 ` Sergey Senozhatsky
2015-07-11 2:51 ` [PATCH 2/2] mm/shrinker: add init_shrinker() function Sergey Senozhatsky
2015-07-11 2:51 ` Sergey Senozhatsky
2015-07-11 10:02 ` [PATCH 0/2] mm/shrinker: make unregister_shrinker() less fragile Christoph Hellwig
2015-07-11 10:02 ` Christoph Hellwig
2015-07-12 2:47 ` Sergey Senozhatsky
2015-07-12 2:47 ` Sergey Senozhatsky
2015-07-13 6:33 ` Christoph Hellwig
2015-07-13 6:33 ` Christoph Hellwig
2015-07-13 6:52 ` Sergey Senozhatsky [this message]
2015-07-13 6:52 ` Sergey Senozhatsky
2015-07-13 9:03 ` Christoph Hellwig
2015-07-13 9:03 ` Christoph Hellwig
2015-07-13 9:34 ` Sergey Senozhatsky
2015-07-13 9:34 ` Sergey Senozhatsky
2015-07-14 7:17 ` Christoph Hellwig
2015-07-14 7:17 ` Christoph Hellwig
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=20150713065253.GA811@swordfish \
--to=sergey.senozhatsky.work@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=hch@infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=sergey.senozhatsky@gmail.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.