Re: [RFC] Common code 01/12] [slob] define page struct fields used in mm_types.h

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

 



>> > +static inline void clear_slob_page_free(struct page *sp)
>> >  {
>> >        list_del(&sp->list);
>> > -       __ClearPageSlobFree((struct page *)sp);
>> > +       __ClearPageSlobFree(sp);
>> >  }
>>
>> I think we shouldn't use __ClearPageSlobFree anymore.
>> Before this patch, list_del affect page->private,
>> so when we manipulate slob list,
>> using PageSlobFree overloaded with PagePrivate is reasonable.
>> But, after this patch is applied, list_del doesn't touch page->private,
>> so manipulate PageSlobFree is not reasonable.
>> We would use another method for checking slob_page_free without
>> PageSlobFree flag.
>
> What method should we be using?

Actually, I have no good idea.
How about below implementation?

static inline int slob_page_free(struct page *sp)
{
        return !list_empty(&sp->list);
}

static void set_slob_page_free(struct page *sp, struct list_head *list)
{
        list_add(&sp->list, list);
}

static inline void clear_slob_page_free(struct page *sp)
{
        list_del_init(&sp->list);
}

Above functions' name should be changed something like "add_freelist,
remove_freelist, in_freelist" for readability

--
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/ .
Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/
Don't email: <a href


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