From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1161813AbeBNSO1 (ORCPT ); Wed, 14 Feb 2018 13:14:27 -0500 Received: from aserp2120.oracle.com ([141.146.126.78]:36702 "EHLO aserp2120.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1161697AbeBNSOY (ORCPT ); Wed, 14 Feb 2018 13:14:24 -0500 Subject: Re: [RFC PATCH V2 00/22] Intel(R) Resource Director Technology Cache Pseudo-Locking enabling To: Reinette Chatre , tglx@linutronix.de, fenghua.yu@intel.com, tony.luck@intel.com Cc: gavin.hindman@intel.com, vikas.shivappa@linux.intel.com, dave.hansen@intel.com, mingo@redhat.com, hpa@zytor.com, x86@kernel.org, linux-kernel@vger.kernel.org, linux-mm@kvack.org, Andrew Morton , Michal Hocko , Vlastimil Babka References: From: Mike Kravetz Message-ID: Date: Wed, 14 Feb 2018 10:12:03 -0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.5.2 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-Proofpoint-Virus-Version: vendor=nai engine=5900 definitions=8805 signatures=668671 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=0 malwarescore=0 phishscore=0 bulkscore=0 spamscore=0 mlxscore=0 mlxlogscore=980 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1711220000 definitions=main-1802140214 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 02/13/2018 07:46 AM, Reinette Chatre wrote: > Adding MM maintainers to v2 to share the new MM change (patch 21/22) that > enables large contiguous regions that was created to support large Cache > Pseudo-Locked regions (patch 22/22). This week MM team received another > proposal to support large contiguous allocations ("[RFC PATCH 0/3] > Interface for higher order contiguous allocations" at > http://lkml.kernel.org/r/20180212222056.9735-1-mike.kravetz@oracle.com). > I have not yet tested with this new proposal but it does seem appropriate > and I should be able to rework patch 22 from this series on top of that if > it is accepted instead of what I have in patch 21 of this series. > Well, I certainly would prefer the adoption and use of a more general purpose interface rather than exposing alloc_gigantic_page(). Both the interface I suggested and alloc_gigantic_page end up calling alloc_contig_range(). I have not looked at your entire patch series, but do be aware that in its present form alloc_contig_range will run into issues if called by two threads simultaneously for the same page range. Calling alloc_gigantic_page without some form of synchronization will expose this issue. Currently this is handled by hugetlb_lock for all users of alloc_gigantic_page. If you simply expose alloc_gigantic_page without any type of synchronization, you may run into issues. The first patch in my RFC "mm: make start_isolate_page_range() fail if already isolated" should handle this situation IF we decide to expose alloc_gigantic_page (which I do not suggest). -- Mike Kravetz