From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1161060AbbKELL0 (ORCPT ); Thu, 5 Nov 2015 06:11:26 -0500 Received: from szxga03-in.huawei.com ([119.145.14.66]:17997 "EHLO szxga03-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1031139AbbKELLY (ORCPT ); Thu, 5 Nov 2015 06:11:24 -0500 Message-ID: <563B3942.90305@huawei.com> Date: Thu, 5 Nov 2015 19:10:58 +0800 From: Xishi Qiu User-Agent: Mozilla/5.0 (Windows NT 6.1; rv:12.0) Gecko/20120428 Thunderbird/12.0.1 MIME-Version: 1.0 To: Laura Abbott CC: zhong jiang , Laura Abbott , Kees Cook , "Catalin Marinas" , Will Deacon , "linux-arm-kernel@lists.infradead.org" , LKML , Ard Biesheuvel , Mark Rutland Subject: Re: [PATCH 2/2] arm64: Allow changing of attributes outside of modules References: <1446587315-18145-1-git-send-email-labbott@fedoraproject.org> <1446587315-18145-3-git-send-email-labbott@fedoraproject.org> <563974A8.3060306@huawei.com> <563A4A74.60900@redhat.com> In-Reply-To: <563A4A74.60900@redhat.com> Content-Type: text/plain; charset="windows-1252" Content-Transfer-Encoding: 7bit X-Originating-IP: [10.177.25.179] X-CFilter-Loop: Reflected X-Mirapoint-Virus-RAPID-Raw: score=unknown(0), refid=str=0001.0A090201.563B3950.0118,ss=1,re=0.000,recu=0.000,reip=0.000,cl=1,cld=1,fgs=0, ip=0.0.0.0, so=2013-05-26 15:14:31, dmn=2013-03-21 17:37:32 X-Mirapoint-Loop-Id: 17a811222b890ea1751033a9198a1f95 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2015/11/5 2:12, Laura Abbott wrote: > On 11/03/2015 06:59 PM, zhong jiang wrote: >> >> Hi Laura >> >> This patch seems vaild, but I didn't feel very reasonable. >> Because of the large page to make TLB performance better, just >> split it if it is necessary.therefore, I think the first thing >> we try to keep it, if they fail ,and then to split. >> > > I'm not quite sure I understand the request. We know we are going > to have to have something mapped at page size granularity so we > are going to have to break down the larger mappings no matter > what. Can you explain a bit more where you think we could try to > keep the larger mappings? > Hi Laura, He means like this, if the range is aligned with large page, we need not to split it, just change the flag. I have one more question. alloc_init_pud() ... if (!pud_none(old_pud)) ... memblock_free(table, PAGE_SIZE); ... Here we will free the memory from pmd page, so why not free more memory from 512 pte pages, if the 512 old pmds are not none? Thanks, Xishi Qiu > At least two things I noticed looking at this again though: > - This only splits the start address. If the range happens > to overlap a pud/pmd this won't work. I'll address that in v2 > - We're always flushing the TLB even if nothing changed. Was > this what you were referring to? > > >> thanks >> zhongjiang >> >> > > Thanks, > Laura > > > . >