From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752639AbdAZCyZ (ORCPT ); Wed, 25 Jan 2017 21:54:25 -0500 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:35283 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752453AbdAZCyY (ORCPT ); Wed, 25 Jan 2017 21:54:24 -0500 Date: Wed, 25 Jan 2017 18:54:08 -0800 From: Srikar Dronamraju To: "Kirill A. Shutemov" Cc: Johannes Weiner , Andrew Morton , "Kirill A. Shutemov" , Andrea Arcangeli , Hugh Dickins , Rik van Riel , linux-mm@kvack.org, linux-kernel@vger.kernel.org, Oleg Nesterov , Peter Zijlstra Subject: Re: [PATCH 01/12] uprobes: split THPs before trying replace them Reply-To: Srikar Dronamraju References: <20170124162824.91275-1-kirill.shutemov@linux.intel.com> <20170124162824.91275-2-kirill.shutemov@linux.intel.com> <20170124132849.73135e8c6e9572be00dbbe79@linux-foundation.org> <20170124222217.GB19920@node.shutemov.name> <20170125165522.GA11569@linux.vnet.ibm.com> <20170125183510.GB17286@cmpxchg.org> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline In-Reply-To: <20170125183510.GB17286@cmpxchg.org> User-Agent: Mutt/1.5.24 (2015-08-30) X-TM-AS-MML: disable X-Content-Scanned: Fidelis XPS MAILER x-cbid: 17012602-0032-0000-0000-000001D92387 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 17012602-0033-0000-0000-00001209243E Message-Id: <20170126025408.GB11569@linux.vnet.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2017-01-25_18:,, signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 spamscore=0 suspectscore=0 malwarescore=0 phishscore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1612050000 definitions=main-1701260027 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > > > > The first time the breakpoint is hit on a page, it replaces the text > > page with anon page. Now lets assume we insert breakpoints in all the > > pages in a range. Here each page is individually replaced by a non THP > > anonpage. (since we dont have bulk breakpoint insertion support, > > breakpoint insertion happens one at a time). Now the only interesting > > case may be when each of these replaced pages happen to be physically > > contiguous so that THP kicks in to replace all of these pages with one > > THP page. Can happen in practice? > > > > Are there any other cases that I have missed? > > We use a hack in our applications where we open /proc/self/maps, copy > text segments to a staging area, then create overlay anon mappings on > top and copy the text back into them. Now we have THP-backed text and > very little iTLB pressure :-) > > That said, we haven't run into the uprobes issue yet. > Thanks Johannes, Kirill, Rik. Reviewed-by: Srikar Dronamraju