From: Pekka Enberg <penberg@cs.helsinki.fi>
To: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: akpm@linux-foundation.org, linux-kernel@vger.kernel.org,
hch@infradead.org, alan@lxorguk.ukuu.org.uk, serue@us.ibm.com
Subject: Re: [PATCH 3/7] revoke: core code
Date: Sun, 11 Mar 2007 13:25:16 +0200 [thread overview]
Message-ID: <1173612316.7330.3.camel@haji> (raw)
In-Reply-To: <1173443414.4429.7.camel@lappy>
On Fri, 2007-03-09 at 10:15 +0200, Pekka J Enberg wrote:
> > + again:
> > + restart_addr = zap_page_range(vma, start_addr, end_addr - start_addr,
> > + details);
> > +
> > + need_break = need_resched() || need_lockbreak(details->i_mmap_lock);
> > + if (need_break)
> > + goto out_need_break;
> > +
> > + if (restart_addr < end_addr) {
> > + start_addr = restart_addr;
> > + goto again;
> > + }
> > + return 0;
> > +
> > + out_need_break:
> > + spin_unlock(details->i_mmap_lock);
> > + cond_resched();
> > + spin_lock(details->i_mmap_lock);
> > + return -EINTR;
On Fri, 2007-03-09 at 13:30 +0100, Peter Zijlstra wrote:
> I'm not sure this scheme works, given a sufficiently loaded machine,
> this might never complete.
Hmm, so what's the alternative? It's better to fail revoke than lock up
the box.
On Fri, 2007-03-09 at 13:30 +0100, Peter Zijlstra wrote:
> I'm never sure of operator precedence and prefer:
>
> (vma->vm_flags & VM_SHARED) && ...
>
> which leaves no room for error.
Thanks, fixed.
prev parent reply other threads:[~2007-03-11 11:25 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-03-09 8:15 [PATCH 3/7] revoke: core code Pekka J Enberg
2007-03-09 12:17 ` Alan Cox
2007-03-09 11:42 ` Pekka J Enberg
2007-03-09 12:30 ` Peter Zijlstra
2007-03-11 11:25 ` Pekka Enberg [this message]
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=1173612316.7330.3.camel@haji \
--to=penberg@cs.helsinki.fi \
--cc=a.p.zijlstra@chello.nl \
--cc=akpm@linux-foundation.org \
--cc=alan@lxorguk.ukuu.org.uk \
--cc=hch@infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=serue@us.ibm.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