Re: [RFC][PATCHv2 8/8] zsmalloc: register a shrinker to trigger auto-compaction

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

 



On (06/18/15 11:41), Sergey Senozhatsky wrote:
[..]
> > My concern is not a compacion overhead but higher memory footprint
> > consumed by zram in reserved memory.
> > It might hang system if zram used up reserved memory of system with
> > ALLOC_NO_WATERMARKS. With auto-compaction, userspace has a higher chance
> > to use more memory with uncompressible pages or file-backed pages
> > so zram-swap can use more reserved memory. We need to evaluate it, I think.
> > 

a couple of _not really related_ ideas that I want to voice.

(a) I'm thinking of extending zramX/compact attr. right now it's WO,
  and I think it makes sense to make it RW:
    ->write will trigger compaction
    ->read will return estimated number of bytes
  "zs_can_compact() * pages per zspage * page_size" that can be freed.
  so user-space will have at least minimal idea whether compaction is
  reasonable. but sure, this is racy and in general case things may
  change between `cat compact` and `echo 1 > compact`.


(b) adding a knob (yeah, like we don't have enough knobs already :-))
that will allow 'enable/disable auto compaction'.

	-ss

--
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]