Re: [RFC v3 PATCH 04/10] mm/hugetlb: expose hugetlb fault mutex for use by fallocate

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

 



On Thu, 2015-05-21 at 08:47 -0700, Mike Kravetz wrote:
> +/*
> + * Interfaces to the fault mutex routines for use by hugetlbfs
> + * fallocate code.  Faults must be synchronized with page adds or
> + * deletes by fallocate.  fallocate only deals with shared mappings.
> + */
> +u32 hugetlb_fault_mutex_shared_hash(struct address_space *mapping, pgoff_t idx)
> +{
> +	return fault_mutex_hash(NULL, NULL, NULL, mapping, idx, 0);
> +}
> +
> +void hugetlb_fault_mutex_lock(u32 hash)
> +{
> +	mutex_lock(&htlb_fault_mutex_table[hash]);
> +}
> +
> +void hugetlb_fault_mutex_unlock(u32 hash)
> +{
> +	mutex_unlock(&htlb_fault_mutex_table[hash]);
> +}+

These should really be inlined -- maybe add them to hugetlb.h along with
the mutex hashtable bits.

Thanks,
Davidlohr

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@xxxxxxxxx.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@xxxxxxxxx";> email@xxxxxxxxx </a>




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]