2014-12-17 0:48 GMT+09:00 Christoph Lameter :
> On Tue, 16 Dec 2014, Jesper Dangaard Brouer wrote:
>
>> > Ok but now there is a multiplication in the fast path.
>>
>> Could we pre-calculate the value (page->objects * s->size) and e.g store it
>> in struct kmem_cache, thus saving the imul ?
>
> I th
On Tue, 16 Dec 2014, Jesper Dangaard Brouer wrote:
> > Ok but now there is a multiplication in the fast path.
>
> Could we pre-calculate the value (page->objects * s->size) and e.g store it
> in struct kmem_cache, thus saving the imul ?
I think I just used the last available field for the page->a
2014-12-16 18:15 GMT+03:00 Jesper Dangaard Brouer :
> On Tue, 16 Dec 2014 08:53:08 -0600 (CST)
> Christoph Lameter wrote:
>
>> On Tue, 16 Dec 2014, Joonsoo Kim wrote:
>>
>> > > Like this:
>> > >
>> > > return d > 0 && d < page->objects * s->size;
>> > >
>> >
>> > Yes! That's what I'm looki
2014-12-16 17:53 GMT+03:00 Christoph Lameter :
> On Tue, 16 Dec 2014, Joonsoo Kim wrote:
>
>> > Like this:
>> >
>> > return d > 0 && d < page->objects * s->size;
>> >
>>
>> Yes! That's what I'm looking for.
>> Christoph, how about above change?
>
> Ok but now there is a multiplication in th
On Tue, 16 Dec 2014 08:53:08 -0600 (CST)
Christoph Lameter wrote:
> On Tue, 16 Dec 2014, Joonsoo Kim wrote:
>
> > > Like this:
> > >
> > > return d > 0 && d < page->objects * s->size;
> > >
> >
> > Yes! That's what I'm looking for.
> > Christoph, how about above change?
>
> Ok but now t
On Tue, 16 Dec 2014, Joonsoo Kim wrote:
> > Like this:
> >
> > return d > 0 && d < page->objects * s->size;
> >
>
> Yes! That's what I'm looking for.
> Christoph, how about above change?
Ok but now there is a multiplication in the fast path.
--
To unsubscribe from this list: send the lin
On Tue, 16 Dec 2014 11:54:12 +0400
Andrey Ryabinin wrote:
> 2014-12-16 5:42 GMT+03:00 Joonsoo Kim :
> > On Mon, Dec 15, 2014 at 08:16:00AM -0600, Christoph Lameter wrote:
> >> On Mon, 15 Dec 2014, Joonsoo Kim wrote:
> >>
> >> > > +static bool same_slab_page(struct kmem_cache *s, struct page *page
On Tue, Dec 16, 2014 at 11:54:12AM +0400, Andrey Ryabinin wrote:
> 2014-12-16 5:42 GMT+03:00 Joonsoo Kim :
> > On Mon, Dec 15, 2014 at 08:16:00AM -0600, Christoph Lameter wrote:
> >> On Mon, 15 Dec 2014, Joonsoo Kim wrote:
> >>
> >> > > +static bool same_slab_page(struct kmem_cache *s, struct page
2014-12-16 5:42 GMT+03:00 Joonsoo Kim :
> On Mon, Dec 15, 2014 at 08:16:00AM -0600, Christoph Lameter wrote:
>> On Mon, 15 Dec 2014, Joonsoo Kim wrote:
>>
>> > > +static bool same_slab_page(struct kmem_cache *s, struct page *page,
>> > > void *p)
>> > > +{
>> > > + long d = p - page->address;
>> >
On Mon, Dec 15, 2014 at 08:16:00AM -0600, Christoph Lameter wrote:
> On Mon, 15 Dec 2014, Joonsoo Kim wrote:
>
> > > +static bool same_slab_page(struct kmem_cache *s, struct page *page, void
> > > *p)
> > > +{
> > > + long d = p - page->address;
> > > +
> > > + return d > 0 && d < (1 << MAX_ORDER
On Mon, 15 Dec 2014, Joonsoo Kim wrote:
> > +static bool same_slab_page(struct kmem_cache *s, struct page *page, void
> > *p)
> > +{
> > + long d = p - page->address;
> > +
> > + return d > 0 && d < (1 << MAX_ORDER) && d < (compound_order(page) <<
> > PAGE_SHIFT);
> > +}
> > +
>
> Somtimes,
On Wed, Dec 10, 2014 at 10:30:20AM -0600, Christoph Lameter wrote:
> Avoid using the page struct address on free by just doing an
> address comparison. That is easily doable now that the page address
> is available in the page struct and we already have the page struct
> address of the object to be
On Thu, 11 Dec 2014, Jesper Dangaard Brouer wrote:
> If I explicitly add "inline", then it gets inlined, and performance is good
> again.
Ok adding inline for the next release.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.
On Wed, 10 Dec 2014 11:37:56 -0600 (CST) Christoph Lameter
wrote:
[...]
>
> There were some other issues so its now:
>
>
> Subject: slub: Do not use c->page on free
>
> Avoid using the page struct address on free by just doing an
> address comparison. That is easily doable now that the page
On Wed, 10 Dec 2014, Pekka Enberg wrote:
> I'm fine with the optimization:
>
> Reviewed-by: Pekka Enberg
There were some other issues so its now:
Subject: slub: Do not use c->page on free
Avoid using the page struct address on free by just doing an
address comparison. That is easily doable no
On Wed, Dec 10, 2014 at 7:08 PM, Christoph Lameter wrote:
>> > +{
>> > + long d = p - page->address;
>> > +
>> > + return d > 0 && d < (1 << MAX_ORDER) && d < (compound_order(page)
>> > << PAGE_SHIFT);
>> > +}
>>
>> Can you elaborate on what this is doing? I don't really understand it
On Wed, 10 Dec 2014, Pekka Enberg wrote:
> > +static bool same_slab_page(struct kmem_cache *s, struct page *page, void
> > *p)
>
> Why are you passing a pointer to struct kmem_cache here? You don't
> seem to use it.
True.
> > +{
> > + long d = p - page->address;
> > +
> > + return d
On Wed, Dec 10, 2014 at 6:30 PM, Christoph Lameter wrote:
> Avoid using the page struct address on free by just doing an
> address comparison. That is easily doable now that the page address
> is available in the page struct and we already have the page struct
> address of the object to be freed c
Avoid using the page struct address on free by just doing an
address comparison. That is easily doable now that the page address
is available in the page struct and we already have the page struct
address of the object to be freed calculated.
Signed-off-by: Christoph Lameter
Index: linux/mm/slub
19 matches
Mail list logo