Re: [PATCH 1/2] mm: s390: Only notify on 4k pages

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

 



On 25.01.2018 17:04, David Hildenbrand wrote:
> On 25.01.2018 16:33, Janosch Frank wrote:
>> Let's try this
> 
> Actually we can reduce this code here quite a lot by simply checking for
> 
> if (pmd_large(*pmdp)) {
> 	// splitup
> 	rc = EAGAIN;
> }

Yes, we can. (and I did)
It actually looks a lot better now, thanks!

I'm still dreading the rebase to put the changes into the original
patch, though. :)

>> -	/* Remove the page table tree from on specific entry */
>>  	head = radix_tree_delete(&sg->host_to_rmap, (vmaddr & HPAGE_MASK) >> PAGE_SHIFT);
>>  	gmap_for_each_rmap_safe(rmap, rnext, head) {
>>  		bits = rmap->raddr & _SHADOW_RMAP_MASK;
>>  		raddr = rmap->raddr ^ bits;
>> -		switch (bits) {
>> -		case _SHADOW_RMAP_REGION1:
>> -			gmap_unshadow_r2t(sg, raddr);
>> -			break;
>> -		case _SHADOW_RMAP_REGION2:
>> -			gmap_unshadow_r3t(sg, raddr);
>> -			break;
>> -		case _SHADOW_RMAP_REGION3:
>> -			gmap_unshadow_sgt(sg, raddr);
>> -			break;
>> -		case _SHADOW_RMAP_SEGMENT_LP:
>> +		if (bits ==  _SHADOW_RMAP_SEGMENT_LP)
>>  			gmap_unshadow_segment(sg, raddr);
>> -			break;
>> -		case _SHADOW_RMAP_SEGMENT:
>> -			gmap_unshadow_pgt(sg, raddr);
>> -			break;
>> -		case _SHADOW_RMAP_PGTABLE:
>> -			gmap_unshadow_page(sg, raddr);
>> -			break;
>> -		}
> 
> Now this looks much better. Do we still need the _SHADOW_RMAP_SEGMENT_LP
> check in gmap_shadow_notify() ? don't think so

Well the l2 big -> l3 little case also needs _SHADOW_RMAP_PGTABLE, so we
need at least an if/else. I forgot about that case yesterday but just
fixed it up...

Also I'm seeing increased migration time, the 10g l2 takes 1m20s on
postcopy (1m30 precopy) to migrate, which took 30 - 45s before. However,
I did not run into any problems yet, so we got that goin' for us, which
is nice.

Attachment: signature.asc
Description: OpenPGP digital signature


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Kernel Development]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Info]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Linux Media]     [Device Mapper]

  Powered by Linux