linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Minchan Kim <minchan@kernel.org>
To: Seth Jennings <sjenning@linux.vnet.ibm.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Andrew Morton <akpm@linux-foundation.org>,
	Jens Axboe <axboe@kernel.dk>, Nitin Gupta <ngupta@vflare.org>,
	Konrad Rzeszutek Wilk <konrad@darnok.org>,
	Luigi Semenzato <semenzato@google.com>,
	linux-kernel@vger.kernel.org, linux-mm@kvack.org,
	Pekka Enberg <penberg@cs.helsinki.fi>,
	Mel Gorman <mgorman@suse.de>
Subject: Re: [PATCH v6 3/5] zsmalloc: move it under zram
Date: Tue, 20 Aug 2013 13:21:46 +0900	[thread overview]
Message-ID: <20130820042146.GR28062@bbox> (raw)
In-Reply-To: <20130816220034.GD7265@variantweb.net>

Hello Seth,

On Fri, Aug 16, 2013 at 05:00:34PM -0500, Seth Jennings wrote:
> On Wed, Aug 14, 2013 at 02:55:34PM +0900, Minchan Kim wrote:
> > This patch moves zsmalloc under zram directory because there
> > isn't any other user any more.
> > 
> > Before that, description will explain why we have needed custom
> > allocator.
> > 
> > Zsmalloc is a new slab-based memory allocator for storing
> > compressed pages.  It is designed for low fragmentation and
> > high allocation success rate on large object, but <= PAGE_SIZE
> > allocations.
> 
> One things zsmalloc will probably have to address before Andrew deems it
> worthy is the "memmap peekers" issue.  I had to make this change in zbud
> before Andrew would accept it and this is one of the reasons I have yet
> to implement zsmalloc support for zswap yet.
> 
> Basically, zsmalloc makes the assumption that once the kernel page
> allocator gives it a page for the pool, zsmalloc can stuff whatever
> metatdata it wants into the struct page.  The problem comes when some
> parts of the kernel do not obtain the struct page pointer via the
> allocator but via walking the memmap.  Those routines will make certain
> assumption about the state and structure of the data in the struct page,
> leading to issues.

All of memmap peekers should make such asummption based on pageflag
so if zsmalloc don't need touch flag field, it should be no problem.

In addition to that, SLUB allocator already have touched it so why not
for zsmalloc?

> 
> My solution for zbud was to move the metadata into the pool pages
> themselves, using the first block of each page for metadata regarding that
> page.
> 
> Andrew might also have something to say about the placement of
> zsmalloc.c.  IIRC, if it was going to be merged, he wanted it in mm/ if
> it was going to be messing around in the struct page.

NP.

Thanks for the review, Seth.

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

-- 
Kind regards,
Minchan Kim

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

  reply	other threads:[~2013-08-20  4:21 UTC|newest]

Thread overview: 37+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-08-14  5:55 [PATCH v6 0/5] zram/zsmalloc promotion Minchan Kim
2013-08-14  5:55 ` [PATCH v6 1/5] zsmalloc: add Kconfig for enabling page table method Minchan Kim
2013-08-14  5:55 ` [PATCH v6 2/5] zsmalloc: add more comment Minchan Kim
2013-08-14  5:55 ` [PATCH v6 3/5] zsmalloc: move it under zram Minchan Kim
2013-08-16 22:00   ` Seth Jennings
2013-08-20  4:21     ` Minchan Kim [this message]
2013-08-14  5:55 ` [PATCH v6 4/5] mm: export unmap_kernel_range Minchan Kim
2013-08-14  5:55 ` [PATCH v6 5/5] zram: promote zram from staging Minchan Kim
2013-08-14 15:53 ` [PATCH v6 0/5] zram/zsmalloc promotion Luigi Semenzato
2013-08-14 16:17   ` Minchan Kim
2013-08-15  0:18     ` Bob Liu
2013-08-15 15:03       ` Seth Jennings
2013-08-16  2:02     ` Wanpeng Li
2013-08-16  2:02     ` Wanpeng Li
     [not found]     ` <520d883a.a2f6420a.6f36.0d66SMTPIN_ADDED_BROKEN@mx.google.com>
2013-08-16  4:35       ` Minchan Kim
2013-08-16  7:02         ` Alex Elsayed
2013-08-14 17:40 ` Mel Gorman
2013-08-14 18:15   ` Luigi Semenzato
2013-08-14 18:58   ` Minchan Kim
2013-08-15 17:12     ` Mel Gorman
2013-08-16  1:52       ` Bob Liu
2013-08-16  1:53       ` Bob Liu
2013-08-16  4:26       ` Minchan Kim
2013-08-16  4:55         ` Bob Liu
2013-08-16  8:33         ` Mel Gorman
2013-08-16  9:12           ` Mel Gorman
2013-08-16  9:18             ` Bob Liu
2013-08-16 12:49               ` Greg Kroah-Hartman
2013-08-16  9:12           ` Bob Liu
2013-08-19  3:18           ` Minchan Kim
2013-08-19  3:57             ` Bob Liu
2013-08-19  4:37               ` Minchan Kim
2013-08-19  5:29                 ` Luigi Semenzato
2013-08-19  6:07                   ` Bob Liu
2013-08-19  6:11                   ` Minchan Kim
  -- strict thread matches above, loose matches on Subject: below --
2013-08-21  6:16 [PATCH v7 " Minchan Kim
2013-08-21  6:16 ` [PATCH v6 3/5] zsmalloc: move it under zram Minchan Kim
2013-08-14  5:51 [PATCH v6 0/5] zram/zsmalloc promotion Minchan Kim
2013-08-14  5:51 ` [PATCH v6 3/5] zsmalloc: move it under zram Minchan Kim

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=20130820042146.GR28062@bbox \
    --to=minchan@kernel.org \
    --cc=akpm@linux-foundation.org \
    --cc=axboe@kernel.dk \
    --cc=gregkh@linuxfoundation.org \
    --cc=konrad@darnok.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=mgorman@suse.de \
    --cc=ngupta@vflare.org \
    --cc=penberg@cs.helsinki.fi \
    --cc=semenzato@google.com \
    --cc=sjenning@linux.vnet.ibm.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).