All of lore.kernel.org
 help / color / mirror / Atom feed
From: Baolin Wang <baolin.wang@linux.alibaba.com>
To: Matthew Wilcox <willy@infradead.org>
Cc: linux-arch@vger.kernel.org, 0day robot <lkp@intel.com>,
	linux-mm@kvack.org, LKML <linux-kernel@vger.kernel.org>,
	linux-csky@vger.kernel.org, lkp@lists.01.org,
	openrisc@lists.librecores.org,
	kernel test robot <oliver.sang@intel.com>,
	akpm@linux-foundation.org
Subject: Re: [mm] 9b12e49e9b: BUG:Bad_page_state_in_process
Date: Fri, 10 Jun 2022 11:58:54 +0800	[thread overview]
Message-ID: <6351ead6-b4b8-dc43-2c1d-c099094cadc9@linux.alibaba.com> (raw)
In-Reply-To: <YqHlKj5LbmtYGWUy@casper.infradead.org>



On 6/9/2022 8:18 PM, Matthew Wilcox wrote:
> On Thu, Jun 09, 2022 at 12:42:16PM +0800, Baolin Wang wrote:
>> diff --git a/arch/x86/mm/pgtable.c b/arch/x86/mm/pgtable.c
>> index 6cccf52e156a..cae74e972426 100644
>> --- a/arch/x86/mm/pgtable.c
>> +++ b/arch/x86/mm/pgtable.c
>> @@ -858,6 +858,7 @@ int pmd_free_pte_page(pmd_t *pmd, unsigned long addr)
>>          /* INVLPG to clear all paging-structure caches */
>>          flush_tlb_kernel_range(addr, addr + PAGE_SIZE-1);
>>
>> +       pgtable_clear_and_dec(virt_to_page(pte));
>>          free_page((unsigned long)pte);
>>
>>          return 1;
> 
> If you're going to call virt_to_page() here, you may as well cache the
> result and call __free_page(page) to avoid calling virt_to_page() twice.

Right, will do in next version. Thanks.

WARNING: multiple messages have this Message-ID (diff)
From: Baolin Wang <baolin.wang@linux.alibaba.com>
To: Matthew Wilcox <willy@infradead.org>
Cc: kernel test robot <oliver.sang@intel.com>,
	0day robot <lkp@intel.com>, LKML <linux-kernel@vger.kernel.org>,
	linux-csky@vger.kernel.org, openrisc@lists.librecores.org,
	linux-arch@vger.kernel.org, lkp@lists.01.org,
	akpm@linux-foundation.org, linux-mm@kvack.org
Subject: Re: [mm] 9b12e49e9b: BUG:Bad_page_state_in_process
Date: Fri, 10 Jun 2022 11:58:54 +0800	[thread overview]
Message-ID: <6351ead6-b4b8-dc43-2c1d-c099094cadc9@linux.alibaba.com> (raw)
In-Reply-To: <YqHlKj5LbmtYGWUy@casper.infradead.org>



On 6/9/2022 8:18 PM, Matthew Wilcox wrote:
> On Thu, Jun 09, 2022 at 12:42:16PM +0800, Baolin Wang wrote:
>> diff --git a/arch/x86/mm/pgtable.c b/arch/x86/mm/pgtable.c
>> index 6cccf52e156a..cae74e972426 100644
>> --- a/arch/x86/mm/pgtable.c
>> +++ b/arch/x86/mm/pgtable.c
>> @@ -858,6 +858,7 @@ int pmd_free_pte_page(pmd_t *pmd, unsigned long addr)
>>          /* INVLPG to clear all paging-structure caches */
>>          flush_tlb_kernel_range(addr, addr + PAGE_SIZE-1);
>>
>> +       pgtable_clear_and_dec(virt_to_page(pte));
>>          free_page((unsigned long)pte);
>>
>>          return 1;
> 
> If you're going to call virt_to_page() here, you may as well cache the
> result and call __free_page(page) to avoid calling virt_to_page() twice.

Right, will do in next version. Thanks.

WARNING: multiple messages have this Message-ID (diff)
From: Baolin Wang <baolin.wang@linux.alibaba.com>
To: lkp@lists.01.org
Subject: Re: [mm] 9b12e49e9b: BUG:Bad_page_state_in_process
Date: Fri, 10 Jun 2022 11:58:54 +0800	[thread overview]
Message-ID: <6351ead6-b4b8-dc43-2c1d-c099094cadc9@linux.alibaba.com> (raw)
In-Reply-To: <YqHlKj5LbmtYGWUy@casper.infradead.org>

[-- Attachment #1: Type: text/plain, Size: 811 bytes --]



On 6/9/2022 8:18 PM, Matthew Wilcox wrote:
> On Thu, Jun 09, 2022 at 12:42:16PM +0800, Baolin Wang wrote:
>> diff --git a/arch/x86/mm/pgtable.c b/arch/x86/mm/pgtable.c
>> index 6cccf52e156a..cae74e972426 100644
>> --- a/arch/x86/mm/pgtable.c
>> +++ b/arch/x86/mm/pgtable.c
>> @@ -858,6 +858,7 @@ int pmd_free_pte_page(pmd_t *pmd, unsigned long addr)
>>          /* INVLPG to clear all paging-structure caches */
>>          flush_tlb_kernel_range(addr, addr + PAGE_SIZE-1);
>>
>> +       pgtable_clear_and_dec(virt_to_page(pte));
>>          free_page((unsigned long)pte);
>>
>>          return 1;
> 
> If you're going to call virt_to_page() here, you may as well cache the
> result and call __free_page(page) to avoid calling virt_to_page() twice.

Right, will do in next version. Thanks.

  reply	other threads:[~2022-06-10  3:58 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-04  1:32 [RFC PATCH 0/3] Add PUD and kernel PTE level pagetable account Baolin Wang
2022-06-04  1:32 ` [RFC PATCH 1/3] mm: Factor out the pagetable pages account into new helper function Baolin Wang
2022-06-04  1:32 ` [RFC PATCH 2/3] mm: Add PUD level pagetable account Baolin Wang
2022-06-04  1:32 ` [RFC PATCH 3/3] mm: Add kernel PTE level pagetable pages account Baolin Wang
2022-06-08 14:38   ` [mm] 9b12e49e9b: BUG:Bad_page_state_in_process kernel test robot
2022-06-08 14:38     ` kernel test robot
2022-06-08 14:38     ` kernel test robot
2022-06-08 15:07     ` Matthew Wilcox
2022-06-08 15:07       ` Matthew Wilcox
2022-06-08 15:07       ` Matthew Wilcox
2022-06-09  4:45       ` Baolin Wang
2022-06-09  4:45         ` Baolin Wang
2022-06-09  4:45         ` Baolin Wang
2022-06-09  4:42     ` Baolin Wang
2022-06-09  4:42       ` Baolin Wang
2022-06-09  4:42       ` Baolin Wang
2022-06-09 12:18       ` Matthew Wilcox
2022-06-09 12:18         ` Matthew Wilcox
2022-06-09 12:18         ` Matthew Wilcox
2022-06-10  3:58         ` Baolin Wang [this message]
2022-06-10  3:58           ` Baolin Wang
2022-06-10  3:58           ` Baolin Wang

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=6351ead6-b4b8-dc43-2c1d-c099094cadc9@linux.alibaba.com \
    --to=baolin.wang@linux.alibaba.com \
    --cc=akpm@linux-foundation.org \
    --cc=linux-arch@vger.kernel.org \
    --cc=linux-csky@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=lkp@intel.com \
    --cc=lkp@lists.01.org \
    --cc=oliver.sang@intel.com \
    --cc=openrisc@lists.librecores.org \
    --cc=willy@infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.