Re: [PATCH 0/2] mm/shrinker: make unregister_shrinker() less fragile

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Jul 13, 2015 at 03:52:53PM +0900, Sergey Senozhatsky wrote:
> 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).

No, they are not just nice.  They are a fundamental part of memory
management and required to reclaim (often large) amounts of memory.

Nevermind that we don't ignore any other registration time error in
the kernel.

> > 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).

The only important part is here is (c).

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@xxxxxxxxx.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@xxxxxxxxx";> email@xxxxxxxxx </a>



[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]