Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1945974AbbEVRLP (ORCPT ); Fri, 22 May 2015 13:11:15 -0400 Received: from aserp1040.oracle.com ([141.146.126.69]:28079 "EHLO aserp1040.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757360AbbEVRLM (ORCPT ); Fri, 22 May 2015 13:11:12 -0400 Message-ID: <555F630D.4090706@oracle.com> Date: Fri, 22 May 2015 10:10:37 -0700 From: Mike Kravetz User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.7.0 MIME-Version: 1.0 To: Davidlohr Bueso CC: linux-mm@kvack.org, linux-kernel@vger.kernel.org, Dave Hansen , Naoya Horiguchi , David Rientjes , Hugh Dickins , Aneesh Kumar , Hillf Danton , Christoph Hellwig Subject: Re: [RFC v3 PATCH 04/10] mm/hugetlb: expose hugetlb fault mutex for use by fallocate References: <1432223264-4414-1-git-send-email-mike.kravetz@oracle.com> <1432223264-4414-5-git-send-email-mike.kravetz@oracle.com> <1432314077.2185.4.camel@stgolabs.net> In-Reply-To: <1432314077.2185.4.camel@stgolabs.net> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Source-IP: aserv0021.oracle.com [141.146.126.233] Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1196 Lines: 40 On 05/22/2015 10:01 AM, Davidlohr Bueso wrote: > 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. I'll figure out some way to inline them in the next version of the patch set. -- Mike Kravetz > > Thanks, > Davidlohr > -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/