From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.4 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 69FC6C32771 for ; Wed, 15 Jan 2020 21:45:17 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 2A42C222C3 for ; Wed, 15 Jan 2020 21:45:17 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=oracle.com header.i=@oracle.com header.b="aIoDsQCj" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 2A42C222C3 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=oracle.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id AFF678E000A; Wed, 15 Jan 2020 16:45:16 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id AAF848E0003; Wed, 15 Jan 2020 16:45:16 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 99E218E000A; Wed, 15 Jan 2020 16:45:16 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0057.hostedemail.com [216.40.44.57]) by kanga.kvack.org (Postfix) with ESMTP id 864F98E0003 for ; Wed, 15 Jan 2020 16:45:16 -0500 (EST) Received: from smtpin28.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay02.hostedemail.com (Postfix) with SMTP id 4E6BA45AB for ; Wed, 15 Jan 2020 21:45:16 +0000 (UTC) X-FDA: 76381199832.28.coal48_6826a06dcc50c X-HE-Tag: coal48_6826a06dcc50c X-Filterd-Recvd-Size: 5580 Received: from userp2130.oracle.com (userp2130.oracle.com [156.151.31.86]) by imf29.hostedemail.com (Postfix) with ESMTP for ; Wed, 15 Jan 2020 21:45:15 +0000 (UTC) Received: from pps.filterd (userp2130.oracle.com [127.0.0.1]) by userp2130.oracle.com (8.16.0.27/8.16.0.27) with SMTP id 00FLc6DY083947; Wed, 15 Jan 2020 21:45:10 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=subject : to : cc : references : from : message-id : date : mime-version : in-reply-to : content-type : content-transfer-encoding; s=corp-2019-08-05; bh=8sX5t0mPxXZs7YqdzCWNoF9yt3XLM+mgupzpMQWVpH4=; b=aIoDsQCj6DVIqQrDAlO1/BD9N3J4Efe30LpkNPwl4wzXpPFu6zgp3uxpOZeN2owcEsJR S19zH7R7lWL5zYScfovkFca2CnZOtRZTy8dbhPH0cL/QpUveWWref8cGjgNPRQ4L9xYB ZmgEFG9qoQCNu37RyPeH6RfA6w6cY+j4zPvEAHTTUUJ6aakD0DE6YwrmBqzJ8yuMW0uq rDC0r5VuP9kQDJg5RKang4uXgfEvfj653s1A065IzpfRth5Eovc/41N132m/XEYIZ97u AwCcfA96ZSj3c/Nyi1DzVR9TD+fvr4OUUyL9WITC8kcjyiIa3y2qruWTD2EJ4fAVPHoI gg== Received: from userp3030.oracle.com (userp3030.oracle.com [156.151.31.80]) by userp2130.oracle.com with ESMTP id 2xf74sex4u-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 15 Jan 2020 21:45:10 +0000 Received: from pps.filterd (userp3030.oracle.com [127.0.0.1]) by userp3030.oracle.com (8.16.0.27/8.16.0.27) with SMTP id 00FLdQiC034222; Wed, 15 Jan 2020 21:45:10 GMT Received: from aserv0122.oracle.com (aserv0122.oracle.com [141.146.126.236]) by userp3030.oracle.com with ESMTP id 2xhy224rdt-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 15 Jan 2020 21:45:09 +0000 Received: from abhmp0009.oracle.com (abhmp0009.oracle.com [141.146.116.15]) by aserv0122.oracle.com (8.14.4/8.14.4) with ESMTP id 00FLj7EJ024116; Wed, 15 Jan 2020 21:45:07 GMT Received: from [192.168.1.206] (/71.63.128.209) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Wed, 15 Jan 2020 13:45:07 -0800 Subject: Re: [PATCH 2/2] mm/mempolicy: Skip walking HUGETLB vma if MPOL_MF_STRICT is specified alone To: Yang Shi , Li Xinhai , "linux-mm@kvack.org" Cc: akpm , mhocko , n-horiguchi References: <1578993378-10860-1-git-send-email-lixinhai.lxh@gmail.com> <1578993378-10860-2-git-send-email-lixinhai.lxh@gmail.com> <2020011422092314671410@gmail.com> <9fabdc16-fc31-7e06-e306-af38850de771@linux.alibaba.com> From: Mike Kravetz Message-ID: <52a03774-f6cd-c66b-6d27-ebf74aa7a850@oracle.com> Date: Wed, 15 Jan 2020 13:45:05 -0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.3.1 MIME-Version: 1.0 In-Reply-To: <9fabdc16-fc31-7e06-e306-af38850de771@linux.alibaba.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9501 signatures=668685 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=0 malwarescore=0 phishscore=0 bulkscore=0 spamscore=0 mlxscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1911140001 definitions=main-2001150163 X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9501 signatures=668685 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 priorityscore=1501 malwarescore=0 suspectscore=0 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1911140001 definitions=main-2001150163 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On 1/15/20 1:30 PM, Yang Shi wrote: > On 1/15/20 1:07 PM, Mike Kravetz wrote: >> What should we do? >> ================== >> 1) Nothing more than optimizations by Li Xinhai. Behavior that could be >> seen as conflicting with man page has existed since v3.12 and I am >> not aware of any complaints. >> 2) In addition to optimizations by Li Xinhai, modify code to truly ignore >> MPOL_MF_STRICT for huge page mappings. This would be fairly easy to do >> after a failure of migrate_pages(). We could simply traverse the list >> of pages that were not migrated looking for any non-hugetlb page. > > I don't think we can do this easily since migrate_pages() would put the migration failed hugetlb pages back to hugepage_activelist so there should not any hugetlb page reside on the pagelist regardless of failure if I read the code correctly. > You are correct. I made an assumption without actually looking at the code. :( > Other than that traversing page list to look for a certain type page doesn't sound scalable to me. > >> 3) Remove the statement "MPOL_MF_STRICT is ignored on huge page mappings." >> and modify code accordingly. >> >> My suggestion would be for 1 or 2. Thoughts? > > By rethinking the history (thanks again for digging into it), it sounds #3 should be more reasonable. It sounds like the behavior was changed since hugetlb migration was added but the man page was not updated to reflect the change. > Let's hope Naoya comments. My only concern with #3 is that we will be changing behavior. I do not think many people (if any) depend on existing behavior. However, you can never be sure. -- Mike Kravetz