public inbox for linux-ia64@vger.kernel.org
 help / color / mirror / Atom feed
From: Jack Steiner <steiner@sgi.com>
To: linux-ia64@vger.kernel.org
Subject: Re: [PATCH]  Reduce TLB flushing during process migration
Date: Tue, 25 May 2004 13:45:43 +0000	[thread overview]
Message-ID: <20040525134543.GA19869@sgi.com> (raw)
In-Reply-To: <20040522121159.GB19454@sgi.com>

On Mon, May 24, 2004 at 10:26:12PM -0700, Andrew Morton wrote:
> Jack Steiner <steiner@sgi.com> wrote:
> >
> > Here is an updated patch for flushing the TLB on SN2 after a process
> >  migration. The patch is based on the latest "//linux.bkbits.net/linux-2.5"
> >  bitkeeper tree.
> 
> Instant oops on ia32 because p->mm is NULL for kernel threads.  You might
> want to check that on ia64 too - it's not clear to me why it works there.

                                                                                                                                     
On IA64, it is ok to call flush_tlb_mm() with a NULL mm. I not sure if
this is *suppose* to be part of the API for flush_tlb_mm() but it is
allowed on IA64.  flush_tlb_mm() has an explicit check for NULL mm & simply 
returns.
                                                                                                                                     
                                                                                                                                     
                                                                                                                                     
> 
> --- 25/include/asm-generic/tlb.h~reduce-tlb-flushing-during-process-migration-oops-fix	2004-05-24 22:20:30.018626600 -0700
> +++ 25-akpm/include/asm-generic/tlb.h	2004-05-24 22:21:12.621150032 -0700
> @@ -147,6 +147,10 @@ static inline void tlb_remove_page(struc
>  		__pmd_free_tlb(tlb, pmdp);			\
>  	} while (0)
>  
> -#define tlb_migrate_finish(mm) flush_tlb_mm(mm)
> +#define tlb_migrate_finish(mm)					\
> +	do {							\
> +		if (likely(mm))					\
> +			flush_tlb_mm(mm);			\
> +	} while (0)
>  
>  #endif /* _ASM_GENERIC__TLB_H */
> 
> 
> But I don't understand why your patch adds two flush_tlb_mm() calls into
> sched.c on ia32 where there previously was no such call.

I thought I had a good reason. Let me check & make sure I didnt overlook
something. I'll get back to you.....

-- 
Thanks

Jack Steiner (steiner@sgi.com)          651-683-5302
Principal Engineer                      SGI - Silicon Graphics, Inc.



  parent reply	other threads:[~2004-05-25 13:45 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-05-22 12:11 [PATCH] Reduce TLB flushing during process migration Jack Steiner
2004-05-25  5:26 ` Andrew Morton
2004-05-25 13:45 ` Jack Steiner [this message]
2004-06-01 15:59 ` Jack Steiner

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=20040525134543.GA19869@sgi.com \
    --to=steiner@sgi.com \
    --cc=linux-ia64@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox