From: Ingo Molnar <mingo@elte.hu>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: Nick Piggin <npiggin@suse.de>,
linux-arch@vger.kernel.org, torvalds@linux-foundation.org,
rusty@rustcorp.com.au, travis@sgi.com,
linux-kernel@vger.kernel.org, venkatesh.pallipadi@intel.com,
suresh.b.siddha@intel.com, arjan@infradead.org, hpa@zytor.com,
tglx@linutronix.de
Subject: Re: [git pull] cpus4096 tree, part 3
Date: Mon, 26 Jan 2009 21:09:57 +0100 [thread overview]
Message-ID: <20090126200957.GB13471@elte.hu> (raw)
In-Reply-To: <20090126110054.bdddbf38.akpm@linux-foundation.org>
* Andrew Morton <akpm@linux-foundation.org> wrote:
> but why did the current code pass testing at all??
i queued it up a week ago and beyond a same-day breakage i reported to
Nick (and which he fixed) this commit was problem-free and passed all
testing here.
Does it cause problems for you? If yes then please describe the kind of
problems.
Note: i see that -mm modifies a few other details of the x86 pagefault
handling path (there a pagefault-retry patch in there) - so there might be
contextual interactions there. But this particular cleanup/improvement
from Nick is working fine on a wide range of systems here.
Btw., regarding pagefault retry. The bits that are in -mm currently i
find a bit ugly:
> +++ a/arch/x86/mm/fault.c
> @@ -799,7 +799,7 @@ void __kprobes do_page_fault(struct pt_r
> struct vm_area_struct *vma;
> int write;
> int fault;
> - unsigned int retry_flag = FAULT_FLAG_RETRY;
> + int retry_flag = 1;
>
> tsk = current;
> mm = tsk->mm;
> @@ -951,6 +951,7 @@ good_area:
> }
>
> write |= retry_flag;
> +
> /*
> * If for any reason at all we couldn't handle the fault,
> * make sure we exit gracefully rather than endlessly redo
> @@ -969,8 +970,8 @@ good_area:
> * be removed or changed after the retry.
> */
> if (fault & VM_FAULT_RETRY) {
> - if (write & FAULT_FLAG_RETRY) {
> - retry_flag &= ~FAULT_FLAG_RETRY;
> + if (retry_flag) {
> + retry_flag = 0;
> goto retry;
> }
> BUG();
as this complicates every architecture with a 'can the fault be retried'
logic and open-coded retry loop.
But that logic is rather repetitive and once an architecture filters out
all its special in-kernel sources of faults and the hw quirks it has, the
handling of pte faults is rather generic and largely offloaded into
handle_pte_fault() already.
So when this patch was submitted a few weeks ago i suggested that retry
should be done purely in mm/memory.c instead, and the low level code
should at most be refactored to suit this method, but not complicated any
further.
Any deep reasons for why such a more generic approach is not desirable?
Ingo
next prev parent reply other threads:[~2009-01-26 20:10 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <alpine.LFD.2.00.0901021149020.5086@localhost.localdomain>
[not found] ` <20090102203839.GA26850@elte.hu>
[not found] ` <alpine.LFD.2.00.0901021531140.3179@localhost.localdomain>
[not found] ` <20090103193859.GB9805@elte.hu>
[not found] ` <alpine.LFD.2.00.0901031225020.3179@localhost.localdomain>
[not found] ` <20090103203621.GA2491@elte.hu>
[not found] ` <20090103213856.GA24138@elte.hu>
[not found] ` <alpine.LFD.2.00.0901031347570.3179@localhost.localdomain>
[not found] ` <20090103223723.GA17047@elte.hu>
[not found] ` <20090105011416.GG32239@wotan.suse.de>
2009-01-05 1:16 ` [git pull] cpus4096 tree, part 3 Nick Piggin
2009-01-26 19:00 ` Andrew Morton
2009-01-26 19:09 ` Linus Torvalds
2009-01-26 19:30 ` Andrew Morton
2009-01-26 20:09 ` Ingo Molnar [this message]
2009-01-26 20:44 ` Andrew Morton
[not found] ` <604427e00901261312w23a1f0f5y61fc5c6cc70297fb@mail.gmail.com>
2009-01-26 23:21 ` Ingo Molnar
2009-01-26 23:44 ` Andrew Morton
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=20090126200957.GB13471@elte.hu \
--to=mingo@elte.hu \
--cc=akpm@linux-foundation.org \
--cc=arjan@infradead.org \
--cc=hpa@zytor.com \
--cc=linux-arch@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=npiggin@suse.de \
--cc=rusty@rustcorp.com.au \
--cc=suresh.b.siddha@intel.com \
--cc=tglx@linutronix.de \
--cc=torvalds@linux-foundation.org \
--cc=travis@sgi.com \
--cc=venkatesh.pallipadi@intel.com \
/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