lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20080802090335.D6C8.E1E9C6FF@jp.fujitsu.com>
Date:	Sat, 02 Aug 2008 09:16:28 +0900
From:	Yasunori Goto <y-goto@...fujitsu.com>
To:	Christoph Lameter <cl@...ux-foundation.org>
Cc:	Badari Pulavarty <pbadari@...ibm.com>,
	Andrew Morton <akpm@...ux-foundation.org>,
	Mel Gorman <mel@....ul.ie>, linux-mm <linux-mm@...ck.org>,
	Linux Kernel ML <linux-kernel@...r.kernel.org>
Subject: Re: [RFC:Patch: 000/008](memory hotplug) rough idea of pgdat removing

> Yasunori Goto wrote:
> 
> > I thought it at first, but are there the following worst case?
> > 
> > 
> >    CPU 0                                    CPU 1
> > -------------------------------------------------------
> > __alloc_pages()
> >     
> >     parsing_zonelist()
> >         :
> >     enter page_reclarim()
> >     sleep (and remember zone)                 :
> >                                               :
> >                                         update zonelist and node_online_map
> >                                           with stop_machine_run()
> >                                         free pgdat().
> >                                         remove the Node electrically.
> > 
> >     wake up and touch remembered
> >        zone,  but it is removed
> >     (Oops!!!)
> > 
> > 
> > 
> > Anyway, I'm happy if there is better way than my poor idea. :-)
> > 
> > Thanks for your comment.
> 
> Duh. Then the use of RCU would also mean that all of reclaim must
>  be in a rcu period. So  reclaim cannot sleep anymore.

I use srcu_read_lock() (sleepable rcu lock) if kernel must be sleep for
page reclaim. So, my patch basic idea is followings.


   CPU 0                                    CPU 1
-------------------------------------------------------
__alloc_pages()
     
    rcu_read_lock() and check 
      online bitmap
        parsing_zonelist()
    rcu_read_unlock()
        :
    enter page_reclarim()
    srcu_read_lock()
      parse zone/zonelist.
      sleep (and remember zone)                 :
                                               :
                                        update zonelist and node_online_map
                                          with stop_machine_run()

    wake up and touch remembered zone,  
   srcu_read_unlock()
                                        syncronized_sched().
                                        free_pgdat()


Thanks.

-- 
Yasunori Goto 


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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ