Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1357828
| From | Minchan Kim <minchan@kernel.org> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH v1 09/19] zsmalloc: keep max_object in size_class |
| Date | 2016-03-15 07:50 +0100 |
| Message-ID | <rcQXM-6S7-5@gated-at.bofh.it> (permalink) |
| References | <rbpPX-2Oc-7@gated-at.bofh.it> <rbpPX-2Oc-11@gated-at.bofh.it> <rcQEq-6J1-5@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On Tue, Mar 15, 2016 at 03:28:24PM +0900, Sergey Senozhatsky wrote:
> On (03/11/16 16:30), Minchan Kim wrote:
> > Every zspage in a size_class has same number of max objects so
> > we could move it to a size_class.
> >
> > Signed-off-by: Minchan Kim <minchan@kernel.org>
> > ---
> > mm/zsmalloc.c | 29 ++++++++++++++---------------
> > 1 file changed, 14 insertions(+), 15 deletions(-)
> >
> > diff --git a/mm/zsmalloc.c b/mm/zsmalloc.c
> > index b4fb11831acb..ca663c82c1fc 100644
> > --- a/mm/zsmalloc.c
> > +++ b/mm/zsmalloc.c
> > @@ -32,8 +32,6 @@
> > * page->freelist: points to the first free object in zspage.
> > * Free objects are linked together using in-place
> > * metadata.
> > - * page->objects: maximum number of objects we can store in this
> > - * zspage (class->zspage_order * PAGE_SIZE / class->size)
> > * page->lru: links together first pages of various zspages.
> > * Basically forming list of zspages in a fullness group.
> > * page->mapping: class index and fullness group of the zspage
> > @@ -211,6 +209,7 @@ struct size_class {
> > * of ZS_ALIGN.
> > */
> > int size;
> > + int objs_per_zspage;
> > unsigned int index;
>
> struct page ->objects "comes for free". now we don't use it, instead
> every size_class grows by 4 bytes? is there any reason for this?
It is union with _mapcount and it is used by checking non-lru movable
page in this patchset.
>
> -ss
Back to linux.kernel | Previous | Next — Previous in thread | Find similar | Unroll thread
[PATCH v1 09/19] zsmalloc: keep max_object in size_class Minchan Kim <minchan@kernel.org> - 2016-03-11 08:40 +0100
Re: [PATCH v1 09/19] zsmalloc: keep max_object in size_class xuyiping <xuyiping@hisilicon.com> - 2016-03-12 02:50 +0100
Re: [PATCH v1 09/19] zsmalloc: keep max_object in size_class Minchan Kim <minchan@kernel.org> - 2016-03-14 06:00 +0100
Re: [PATCH v1 09/19] zsmalloc: keep max_object in size_class Sergey Senozhatsky <sergey.senozhatsky.work@gmail.com> - 2016-03-15 07:30 +0100
Re: [PATCH v1 09/19] zsmalloc: keep max_object in size_class Minchan Kim <minchan@kernel.org> - 2016-03-15 07:50 +0100
csiph-web