All of lore.kernel.org
 help / color / mirror / Atom feed
From: Nitin Gupta <nitin.m.gupta@oracle.com>
To: sparclinux@vger.kernel.org
Subject: Re: tlb_batch_add_one()
Date: Thu, 30 Mar 2017 22:12:26 +0000	[thread overview]
Message-ID: <c54a8a95-ee95-4a91-91ad-a61b05e85e6f@oracle.com> (raw)
In-Reply-To: <20170328.175226.210187301635964014.davem@davemloft.net>



On 3/30/17 2:54 PM, David Miller wrote:
> From: David Miller <davem@davemloft.net>
> Date: Thu, 30 Mar 2017 14:25:53 -0700 (PDT)
> 
>> From: Nitin Gupta <nitin.m.gupta@oracle.com>
>> Date: Thu, 30 Mar 2017 13:47:11 -0700
>>
>>> I will be sending a fix for these call-sites today.
>>
>> I already have a fix I'm testing now which I'll check in after my
>> regression test passes.
> 
> So even with the shifts fixed, as per the patch below, I'm still getting
> corruptions during gcc bootstraps.
> 
> If I cannot figure out what the problem is by the end of the day I'm
> reverting the change.  I've already spend a week trying to figure out
> what introduced these regressions...
> 

My bad, never tested with THP. I've enabled it now and trying to root
cause it. I may not have a fix ready today though, so can't ask
you to hold the revert till I figure it out.

Nitin


> diff --git a/arch/sparc/mm/tlb.c b/arch/sparc/mm/tlb.c
> index afda3bb..ee8066c 100644
> --- a/arch/sparc/mm/tlb.c
> +++ b/arch/sparc/mm/tlb.c
> @@ -154,7 +154,7 @@ static void tlb_batch_pmd_scan(struct mm_struct *mm, unsigned long vaddr,
>  		if (pte_val(*pte) & _PAGE_VALID) {
>  			bool exec = pte_exec(*pte);
>  
> -			tlb_batch_add_one(mm, vaddr, exec, false);
> +			tlb_batch_add_one(mm, vaddr, exec, PAGE_SHIFT);
>  		}
>  		pte++;
>  		vaddr += PAGE_SIZE;
> @@ -209,9 +209,9 @@ void set_pmd_at(struct mm_struct *mm, unsigned long addr,
>  			pte_t orig_pte = __pte(pmd_val(orig));
>  			bool exec = pte_exec(orig_pte);
>  
> -			tlb_batch_add_one(mm, addr, exec, true);
> +			tlb_batch_add_one(mm, addr, exec, REAL_HPAGE_SHIFT);
>  			tlb_batch_add_one(mm, addr + REAL_HPAGE_SIZE, exec,
> -					true);
> +					  REAL_HPAGE_SHIFT);
>  		} else {
>  			tlb_batch_pmd_scan(mm, addr, orig);
>  		}
> --
> To unsubscribe from this list: send the line "unsubscribe sparclinux" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 

  parent reply	other threads:[~2017-03-30 22:12 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-03-29  0:52 tlb_batch_add_one() David Miller
2017-03-30 20:22 ` tlb_batch_add_one() David Miller
2017-03-30 20:47 ` tlb_batch_add_one() Nitin Gupta
2017-03-30 21:25 ` tlb_batch_add_one() David Miller
2017-03-30 21:54 ` tlb_batch_add_one() David Miller
2017-03-30 22:12 ` Nitin Gupta [this message]
2017-03-30 23:59 ` tlb_batch_add_one() Nitin Gupta
2017-03-31  0:42 ` tlb_batch_add_one() Nitin Gupta
2017-03-31  2:46 ` tlb_batch_add_one() Nitin Gupta
2017-03-31  2:57 ` tlb_batch_add_one() David Miller
2017-03-31  3:12 ` tlb_batch_add_one() Nitin Gupta
2017-03-31  3:34 ` tlb_batch_add_one() David Miller

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=c54a8a95-ee95-4a91-91ad-a61b05e85e6f@oracle.com \
    --to=nitin.m.gupta@oracle.com \
    --cc=sparclinux@vger.kernel.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.