lkml.org 
[lkml]   [2006]   [May]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    SubjectRe: [PATCH] don't use flush_tlb_all in suspend time
    From
    Date
    On Thu, 2006-05-18 at 10:31 +0200, Pavel Machek wrote:
    > Hi!
    >
    > > > > In which case, how's about this?
    > > >
    > > > Certainly better, I'd say.
    > > >
    > > > > @@ -420,7 +421,14 @@ void zap_low_mappings (void)
    > > > > #else
    > > > > set_pgd(swapper_pg_dir+i, __pgd(0));
    > > > > #endif
    > > > > - if (cpus_weight(cpu_online_map) == 1)
    > > > > + /*
    > > > > + * We can be called at suspend/resume time, with local interrupts
    > > > > + * disabled. But flush_tlb_all() requires that local interrupts be
    > > > > + * enabled.
    > > > > + *
    > > > > + * Happily, the APs are not yet started, so we can use local_flush_tlb() * in that case
    > > > > + */
    > > > > + if (num_online_cpus() == 1)
    > > > > local_flush_tlb();
    > > > > else
    > > > > flush_tlb_all();
    > > >
    > > > But this still scares. It means calling convention is "may enable
    > > > interrupts with >1 cpu, may not with == 1 cpu".
    > > Below patch should make things clean. How do you think?
    >
    > Nice...
    >
    > Could we perhaps reuse swsusp_pg_dir (just make it used for swsusp &
    > suspend-to-ram) to save a bit more code? It is in arch/i386/mm/init.c
    Sure. But it's under CONFIG_SOFTWARE_SUSPEND. That part needs cleanup I
    think and it's a little strange to me (why should we simply copy
    swapper_pg_dir to swsusp_pg_dir, instead do it in zap_low_mappings?).

    Thanks,
    Shaohua
    -
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/

    \
     
     \ /
      Last update: 2006-05-18 10:42    [W:0.048 / U:1.820 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site