Re: [PATCHv3, RFC 31/34] thp: initial implementation of do_huge_linear_fault()

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

 



On 04/05/2013 04:59 AM, Kirill A. Shutemov wrote:
> +	if (unlikely(khugepaged_enter(vma)))
> +		return VM_FAULT_OOM;
...
> +	ret = vma->vm_ops->huge_fault(vma, &vmf);
> +	if (unlikely(ret & VM_FAULT_OOM))
> +		goto uncharge_out_fallback;
> +	if (unlikely(ret & (VM_FAULT_ERROR | VM_FAULT_NOPAGE | VM_FAULT_RETRY)))
> +		goto uncharge_out;
> +
> +	if (unlikely(PageHWPoison(vmf.page))) {
> +		if (ret & VM_FAULT_LOCKED)
> +			unlock_page(vmf.page);
> +		ret = VM_FAULT_HWPOISON;
> +		goto uncharge_out;
> +	}

One note on all these patches, but especially this one is that I think
they're way too liberal with unlikely()s.  You really don't need to do
this for every single error case.  Please reserve them for places where
you _know_ there is a benefit, or that the compiler is doing things that
you _know_ are blatantly wrong.
--
To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [Samba]     [Device Mapper]     [CEPH Development]
  Powered by Linux