lkml.org 
[lkml]   [2009]   [Jan]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [PATCH v1 1/8] Deferred batching of dput()
    Evgeniy Polyakov wrote:
    > Hi Mike.
    >
    > On Fri, Jan 16, 2009 at 06:29:42PM -0800, Mike Waychison (mikew@google.com) wrote:
    >> +static void postpone_dput(struct dentry *dentry)
    >> +{
    >> + struct postponed_dentries *ppd, *new_ppd;
    >> +
    >> +again:
    >> + ppd = get_cpu_var(postponed_dentries);
    >> + if (!pending_dput_full(ppd)) {
    >> + add_pending_dput(ppd, dentry);
    >> + put_cpu_var(postponed_dentries);
    >> + return;
    >> + }
    >> +
    >> + /* need to flush out existing pending dentries. */
    >> + put_cpu_var(postponed_dentries);
    >> + /* Allocate more space.. */
    >> + new_ppd = new_postponed_dentries();
    >> + if (!new_ppd) {
    >> + /* Take the slow path, memory is low */
    >> + struct postponed_dentries_onstack ppd_onstack;
    >> + struct postponed_dentries *ppd;
    >> +
    >> + ppd = init_ppd_onstack(&ppd_onstack);
    >> + add_pending_dput(ppd, dentry);
    >> + process_postponed_dentries(ppd);
    >> + return;
    >> + }
    >
    > Why don't you want just to put the dentry in the lowmem condition?
    >

    You're right. This path could just use the original dput path. I'll
    fix it up in the next version.


    \
     
     \ /
      Last update: 2009-01-20 21:09    [W:0.023 / U:360.548 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site