Re: [RFC PATCH 0/3] page count lock for simpler put_page

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Aug 12, 2011 at 04:45:59PM -0700, Michel Lespinasse wrote:
> On Fri, Aug 12, 2011 at 10:27 AM, Paul E. McKenney
> <paulmck@xxxxxxxxxxxxxxxxxx> wrote:
> > Or maybe I make rcu_cookie_gp_elapsed() take only one cookie and
> > compare it to the current cookie.  This would save a bit of code in
> > the TINY cases:
> >
> >        rcu_get_gp_cookie(&pagep->rcucookie);
> >        . . .
> >
> >        if (!rcu_cookie_gp_elapsed(&pagep->rcucookie))
> >                synchronize_rcu();
> 
> Agree this looks nicer that having the second cookie on the stack. As
> you said, this does not allow us to compare two past points in time,
> but I really don't see a use case for that.

And actually hand-writing the code got me the following API:

struct rcu_cookie;
void rcu_get_gp_cookie(struct rcu_cookie *rcp);
void rcu_gp_cookie_elapsed(struct rcu_cookie *rcp);

For TREE{_PREEMPT,}_RCU these are both external calls (#include hell
and all that).  For TINY{_PREEMPT,}_RCU they are both trivial inlineable
functions.

> > How long would there normally be between recording the cookie and
> > checking for the need for a grace period?  One disk access?  One HZ?
> > Something else?
> 
> I would expect >>10 seconds in the normal case ? I'm not sure how much
> lower this may get in adverse workloads. Andrea ?

>>10 seconds would be way more than enough to allow this to work well.
But if we are getting much below 100 milliseconds, we need to rethink
this.

							Thanx, Paul

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@xxxxxxxxx.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/
Don't email: <a href=mailto:"dont@xxxxxxxxx";> email@xxxxxxxxx </a>


[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]