Received: by 2002:ad5:4acb:0:0:0:0:0 with SMTP id n11csp4158490imw; Tue, 12 Jul 2022 03:02:54 -0700 (PDT) X-Google-Smtp-Source: AGRyM1vcLxfa1i62WoAsWZUhRr1TO3KfiTNKnCf140fytzqXXEm6EDxcelLZcT6/NLJ/bzNgYNIB X-Received: by 2002:a65:4848:0:b0:3fc:52c3:6ca5 with SMTP id i8-20020a654848000000b003fc52c36ca5mr19446594pgs.264.1657620173762; Tue, 12 Jul 2022 03:02:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1657620173; cv=none; d=google.com; s=arc-20160816; b=FPMlOHJCh7V8AjJhG1n0RJH/NVG22G5bGuF5/RIrDDsJCEjW3cJO1+Bj5NGuuDTzQ5 8wAHhcu46x5SMrdrdEaDIb5Ia1zldHSeGtpl9hGQC7SdhEpRCycRdHyXOs7n1KHgr2Oh fHTU1HMcQKLpZk1xJ84XMQPO58EZ76pUER+ehFVfhTxSZ7KLLArNzXywZovDZMmC99lV RbMsAlR6RPx0C0O2CZ4sdYt4gw8lgV07kymFipZeqtdDh8hAXMEd5OVzwc7LuzUQkfyZ MnOjOtg33hcFbjiakbJjyEZSqex10hMtTzErISY6o7ygEhnqMA+14ayC11WgVSv7Kx+B 6y3g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:references:cc :to:from:subject; bh=eI5kPmZcJvBud4SvSsnQWqNh/qzcJz53ViR7GhkXU84=; b=dI5bkBJBdtqBreZqDixI1kXs4yJ2OW/DbX9MtGCK1ATH+pjMtNODE7mLul75FBgiAB A+FLXOQ3LEdLqP/ZE9sVJqrVKJzS8ArBj12lmAVcYNEo0vhYPQcO9ZtBnHPkLexiwp5D ytNGeUmgdfFjo16rBZXahMy/K4lKTGN7b+GGKtwvG7zoVLIhy+mepuUbCeuQDU8GsoyJ 6Wlt2qu7O4T/kbdhPI8sm/u0rb7Zy42j2Q+e5HTeSU6CCdR3aQCFaGL5LC8pVenB8j93 m7zzOUkbs2bHW3Mv5Wl6P7pjZzLQ4nrwrAAR1iFEKl8jeTqWFp8B04dxnNTl7eWhJzgK 1ywg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id v11-20020a17090a088b00b001efce056397si11659854pjc.146.2022.07.12.03.02.39; Tue, 12 Jul 2022 03:02:53 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232378AbiGLKBP (ORCPT + 99 others); Tue, 12 Jul 2022 06:01:15 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49052 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229962AbiGLKBL (ORCPT ); Tue, 12 Jul 2022 06:01:11 -0400 Received: from loongson.cn (mail.loongson.cn [114.242.206.163]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 0BD672B63D; Tue, 12 Jul 2022 03:01:09 -0700 (PDT) Received: from [10.180.13.185] (unknown [10.180.13.185]) by mail.loongson.cn (Coremail) with SMTP id AQAAf9AxCeFkRs1iBggZAA--.55841S3; Tue, 12 Jul 2022 18:01:08 +0800 (CST) Subject: Re: [PATCH] MIPS: fix pmd_mkinvalid From: Hongchen Zhang To: Thomas Bogendoerfer Cc: linux-mips@vger.kernel.org, linux-kernel@vger.kernel.org References: <1657181495-33004-1-git-send-email-zhanghongchen@loongson.cn> <20220707092206.GA9894@alpha.franken.de> Message-ID: <0fd4e823-493f-07f0-08d5-f4a22491b602@loongson.cn> Date: Tue, 12 Jul 2022 18:01:08 +0800 User-Agent: Mozilla/5.0 (X11; Linux loongarch64; rv:68.0) Gecko/20100101 Thunderbird/68.7.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit X-CM-TRANSID: AQAAf9AxCeFkRs1iBggZAA--.55841S3 X-Coremail-Antispam: 1UD129KBjvJXoW7Ary8Zw4xZrW7JrW7Gw48WFg_yoW8Xr4xpF y0yF48JrWDtFn7Gr4xtr1DJFyYyw15tw15Grn8JFyUAay8Xr92qr4UX3yq93y7JF48Wr15 JF4aqFW7Zw1UJaDanT9S1TB71UUUUUUqnTZGkaVYY2UrUUUUjbIjqfuFe4nvWSU5nxnvy2 9KBjDU0xBIdaVrnRJUUUvFb7Iv0xC_Kw4lb4IE77IF4wAFF20E14v26r1j6r4UM7CY07I2 0VC2zVCF04k26cxKx2IYs7xG6rWj6s0DM7CIcVAFz4kK6r1j6r18M28lY4IEw2IIxxk0rw A2F7IY1VAKz4vEj48ve4kI8wA2z4x0Y4vE2Ix0cI8IcVAFwI0_Xr0_Ar1l84ACjcxK6xII jxv20xvEc7CjxVAFwI0_Cr0_Gr1UM28EF7xvwVC2z280aVAFwI0_Cr1j6rxdM28EF7xvwV C2z280aVCY1x0267AKxVW0oVCq3wAS0I0E0xvYzxvE52x082IY62kv0487Mc02F40EFcxC 0VAKzVAqx4xG6I80ewAv7VC0I7IYx2IY67AKxVWUJVWUGwAv7VC2z280aVAFwI0_Jr0_Gr 1lOx8S6xCaFVCjc4AY6r1j6r4UM4x0Y48IcVAKI48JMxk0xIA0c2IEe2xFo4CEbIxvr21l c2xSY4AK6svPMxAIw28IcxkI7VAKI48JMxC20s026xCaFVCjc4AY6r1j6r4UMI8I3I0E5I 8CrVAFwI0_Jr0_Jr4lx2IqxVCjr7xvwVAFwI0_JrI_JrWlx4CE17CEb7AF67AKxVWUXVWU AwCIc40Y0x0EwIxGrwCI42IY6xIIjxv20xvE14v26r1j6r1xMIIF0xvE2Ix0cI8IcVCY1x 0267AKxVWUJVW8JwCI42IY6xAIw20EY4v20xvaj40_WFyUJVCq3wCI42IY6I8E87Iv67AK xVWUJVW8JwCI42IY6I8E87Iv6xkF7I0E14v26r4j6r4UJbIYCTnIWIevJa73UjIFyTuYvj xUgg_TUUUUU X-CM-SenderInfo: x2kd0w5krqwupkhqwqxorr0wxvrqhubq/ X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,NICE_REPLY_A, SPF_HELO_PASS,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2022/7/7 下午7:12, Hongchen Zhang wrote: > On 2022/7/7 下午5:22, Thomas Bogendoerfer wrote: >> On Thu, Jul 07, 2022 at 04:11:35PM +0800, Hongchen Zhang wrote: >>> When a pmd entry is invalidated by pmd_mkinvalid,pmd_present should >>> return true. >>> So introduce a _PMD_PRESENT_INVALID_SHIFT bit to check if a pmd is >>> present but invalidated by pmd_mkinvalid. >> >> What problem are you trying to fix ? What are the symptoms ? >> >>> Reported-by: kernel test robot >> >> the test robot showed problems with your last version of the patch, >> which hasn't been integrated into at least the MIPS tree, so no >> need to that. >> >> Thomas. >> > > Hi Thomas, >   The idea come from the commit: >   b65399f6111b(arm64/mm: Change THP helpers to comply with generic MM >  semantics). >   There is an problem now: >         CPU 0        CPU 1 >     pmdp_invalidate        do_page_fault >     ...              __handle_mm_fault >                     is_swap_pmd == true >                     trigger VM_BUG_ON() ? >     set_pmd_at >   the reason is that pmd_present return true,after this commit >   pmd_present will return false,and the VM_BUG_ON will not be triggered. >   Like arm64 does,we can introduce a new bit to fix this. > > Thanks. Hi Thomas, Is there problem of this patch? What's your opinion of this patch? Thanks