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

Re: [Xen-devel] [PATCH v4 3/8] mm: Scrub pages in alloc_heap_pages() if needed



>>> On 09.06.17 at 22:55, <boris.ostrovsky@xxxxxxxxxx> wrote:
> On 06/09/2017 11:22 AM, Jan Beulich wrote:
>>>>> On 19.05.17 at 17:50, <boris.ostrovsky@xxxxxxxxxx> wrote:
>>> @@ -734,8 +735,15 @@ static struct page_info *get_free_buddy(unsigned int 
>>> +        if ( test_bit(_PGC_need_scrub, &pg[i].count_info) )
>>> +        {
>>> +            if ( need_scrub )
>>> +                scrub_one_page(&pg[i]);
>>> +            node_need_scrub[node]--;
>>> +            /*
>>> +             * Technically, we need to set first_dirty to INVALID_DIRTY_IDX
>>> +             * on buddy's head. However, since we assign pg[i].count_info
>>> +             * below, we can skip this.
>>> +             */
>> This comment is correct only with the current way struct page_info's
>> fields are unionized. In fact I think the comment is unneeded - the
>> buddy is being transitioned from free to allocated here, so the field
>> loses its meaning.
> 
> That, actually, is exactly what I was trying to say. I can drop the
> comment if you feel it is obvious why we don't need to set first_dirty.

Well, my personal order of preference would be to (a) drop
the comment or then (b) re-word it to express the free ->
allocated transition as the reason explicitly. Others my prefer
a corrected comment over no comment at all ...

Jan


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
https://lists.xen.org/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.