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

Re: [Xen-devel] [PATCH v6 1/8] mm: Place unscrubbed pages at the end of pagelist



>>> Boris Ostrovsky <boris.ostrovsky@xxxxxxxxxx> 08/07/17 4:56 PM >>>
>On 08/07/2017 10:37 AM, Jan Beulich wrote:
>>>>>> Boris Ostrovsky <boris.ostrovsky@xxxxxxxxxx> 08/07/17 4:16 PM >>>
>>> On 08/06/2017 01:41 PM, Jan Beulich wrote:
>>>>>>> Boris Ostrovsky <boris.ostrovsky@xxxxxxxxxx> 08/04/17 7:03 PM >>>
>>>>> +                /* See if any of the pages indeed need scrubbing. */
>>>>> +                if ( first_dirty != INVALID_DIRTY_IDX )
>>>>> +                {
>>>>> +                    if ( (1U << cur_order) > first_dirty )
>>>>> +                    {
>>>>> +                        for ( i = first_dirty ; i < (1U << cur_order); 
>>>>> i++ )
>>>>> +                            if ( test_bit(_PGC_need_scrub,
>>>>> +                                          &cur_head[i].count_info) )
>>>>> +                            {
>>>>> +                                idx = i;
>>>>> +                                break;
>>>>> +                            }
>>>> Why again do you need to look through all the pages here, rather than
>>>> simply marking the chunks as needing scrubbing simply based on first_dirty?
>>>> It seems to me that I've asked this before, which is a good indication that
>>>> such special behavior would better have a comment attached.
>>> We want to make sure that there are in fact dirty pages in the
>>> (sub-)buddy: first_dirty is only a hint there *may be* some.
>> But why is that needed? Iirc you don't go to such length when splitting a
>> buddy during allocation.
>
>I felt that allocation is more time-critical and so I decided against
>trying to be "neat" as far as tracking dirty pages exactly.

I'd suggest to use the simpler approach here too, if the more involved one isn't
needed for correctness.

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