From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755114AbbCPUGG (ORCPT ); Mon, 16 Mar 2015 16:06:06 -0400 Received: from mail-db3on0076.outbound.protection.outlook.com ([157.55.234.76]:27684 "EHLO emea01-db3-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1753118AbbCPUGD (ORCPT ); Mon, 16 Mar 2015 16:06:03 -0400 Message-ID: <5507379E.8000607@ezchip.com> Date: Mon, 16 Mar 2015 16:05:50 -0400 From: Chris Metcalf User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:31.0) Gecko/20100101 Thunderbird/31.5.0 MIME-Version: 1.0 To: Davidlohr Bueso , CC: , , Davidlohr Bueso Subject: Re: [PATCH 1/3] tile/elf: reorganize notify_exec() References: <1424901517-25069-1-git-send-email-dave@stgolabs.net> <1424901517-25069-2-git-send-email-dave@stgolabs.net> In-Reply-To: <1424901517-25069-2-git-send-email-dave@stgolabs.net> Content-Type: text/plain; charset="windows-1252"; format=flowed Content-Transfer-Encoding: 7bit X-Originating-IP: [12.216.194.146] X-ClientProxiedBy: BN3PR0401CA0019.namprd04.prod.outlook.com (25.162.159.157) To DB3PR02MB0537.eurprd02.prod.outlook.com (25.160.51.149) Authentication-Results: suse.de; dkim=none (message not signed) header.d=none; X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:DB3PR02MB0537; X-Forefront-Antispam-Report: BMV:1;SFV:NSPM;SFS:(10009020)(6049001)(6009001)(377454003)(51704005)(24454002)(479174004)(36756003)(19580405001)(19580395003)(42186005)(80316001)(77156002)(62966003)(77096005)(40100003)(33656002)(122386002)(87266999)(54356999)(50986999)(46102003)(83506001)(47776003)(15975445007)(99136001)(65806001)(66066001)(65956001)(92566002)(50466002)(87976001)(2950100001)(23746002)(86362001)(18886065003);DIR:OUT;SFP:1101;SCL:1;SRVR:DB3PR02MB0537;H:[10.7.0.239];FPR:;SPF:None;MLV:sfv;LANG:en; X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(601004)(5002010)(5005006);SRVR:DB3PR02MB0537;BCL:0;PCL:0;RULEID:;SRVR:DB3PR02MB0537; X-Forefront-PRVS: 05177D47DC X-OriginatorOrg: ezchip.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 16 Mar 2015 20:05:59.5041 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB3PR02MB0537 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2/25/2015 4:58 PM, Davidlohr Bueso wrote: > In the future mm->exe_file will be done without mmap_sem > serialization, thus isolate and reorganize the tile elf > code to make the transition easier. Good users will, make > use of the more standard get_mm_exe_file(), requiring only > holding the mmap_sem to read the value, and relying on reference > counting to make sure that the exe file won't dissappear > underneath us. > > The visible effects of this patch are: > > o We now take and drop the mmap_sem more often. Instead of > just in arch_setup_additional_pages(), we also do it in: > > 1) get_mm_exe_file() > 2) to get the mm->vm_file and notify the simulator. > > [Note that 1) will disappear once we change the locking > rules for exe_file.] > > o We avoid getting a free page and doing d_path() while > holding the mmap_sem. This requires reordering the checks. > > Cc: Chris Metcalf > Signed-off-by: Davidlohr Bueso > --- > > completely untested. > > arch/tile/mm/elf.c | 47 +++++++++++++++++++++++++++++------------------ > 1 file changed, 29 insertions(+), 18 deletions(-) This looks OK to me and passes basic testing. So here is my Acked-by: Chris Metcalf Or would you prefer I took this through the tile tree? -- Chris Metcalf, EZChip Semiconductor http://www.ezchip.com