Re: [PATCH v6 12/12] s390/mm: Add huge page gmap linking support

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

 



On 13.07.2018 11:00, David Hildenbrand wrote:
> On 13.07.2018 08:37, Janosch Frank wrote:
>> Let's allow huge pmd linking when enabled through the
>> KVM_CAP_S390_HPAGE_1M capability. Also we can now restrict gmap
>> invalidation and notification to the cases where the capability has
>> been activated and save some cycles when that's not the case.
>>
>> @@ -435,7 +435,7 @@ pmd_t pmdp_xchg_direct(struct mm_struct *mm, unsigned long addr,
>>  	pmd_t old;
>>  
>>  	preempt_disable();
>> -	if (mm_has_pgste(mm)) {
>> +	if (mm_has_pgste(mm) && mm->context.allow_gmap_hpage_1m) {
>>  		pmdp_clear_skeys(mm, pmdp, new);
>>  		pmdp_notify(mm, addr);
>>  	}
>> @@ -452,7 +452,7 @@ pmd_t pmdp_xchg_lazy(struct mm_struct *mm, unsigned long addr,
>>  	pmd_t old;
>>  
>>  	preempt_disable();
>> -	if (mm_has_pgste(mm)) {
>> +	if (mm_has_pgste(mm) && mm->context.allow_gmap_hpage_1m) {
>>  		pmdp_clear_skeys(mm, pmdp, new);
>>  		pmdp_notify(mm, addr);
>>  	}
>>
> 
> You should probably change the order of the last two patches, so you
> really only expose the capability if support for huge pages is there.
> 

Which would mean I don't have mm->context.allow_gmap_hpage_1m in this
one and compilation breaks...

Attachment: signature.asc
Description: OpenPGP digital signature


[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux