Re: memory hotplug and pgdat removal

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

 



Ok.....thanks for the sharing....what u said makes sense....:-).
Ok....i must keep repeating to myself: unusing the pgdat.....for the
physical node removed........wow... "unused" and "removal" really
makes a great semantic differences here...

On Sat, Aug 2, 2008 at 2:13 AM, Johannes Weiner <hannes@xxxxxxxxxxxx> wrote:
> Hi Peter,
>
> Peter Teoh <htmldeveloper@xxxxxxxxx> writes:
>
>> http://www.gossamer-threads.com/lists/linux/kernel/954421?page=last
>>
>> Someone please help me out:
>>
>> a.   What is pgdat?  From header - I read but cannot find the
>> motivation behind all these:
>>
>> /*
>> * The pg_data_t structure is used in machines with CONFIG_DISCONTIGMEM
>> * (mostly NUMA machines?) to denote a higher-level memory zone than the
>> * zone denotes.
>> *
>> * On NUMA machines, each NUMA node would have a pg_data_t to describe
>> * it's memory layout.
>> *
>> * Memory statistics and page replacement data structures are
>> maintained on a
>> * per-zone basis.
>> */
>> struct bootmem_data;
>> typedef struct pglist_data {
>>        struct zone node_zones[MAX_NR_ZONES];
>>        struct zonelist node_zonelists[MAX_ZONELISTS];
>>        int nr_zones;
>> #ifdef CONFIG_FLAT_NODE_MEM_MAP
>>        struct page *node_mem_map;
>> #endif
>>        struct bootmem_data *bdata;
>> #ifdef CONFIG_MEMORY_HOTPLUG
>>        /*
>>         * Must be held any time you expect node_start_pfn,
>> node_present_pages
>>         * or node_spanned_pages stay constant.  Holding this will also
>>         * guarantee that any pfn_valid() stays that way.
>>         *
>>         * Nests above zone->lock and zone->size_seqlock.
>>         */
>>        spinlock_t node_size_lock;
>> #endif
>>        unsigned long node_start_pfn;
>>        unsigned long node_present_pages; /* total number of physical
>> pages */
>>        unsigned long node_spanned_pages; /* total size of physical page
>>                                             range, including holes */
>>        int node_id;
>>        wait_queue_head_t kswapd_wait;
>>        struct task_struct *kswapd;
>>        int kswapd_max_order;
>> } pg_data_t;
>>
>> And why not u have to remove it? For what purposes?   Why memory
>> hotplug needs this feature off?
>>
>> And as today I can still can see the structure, so is the patch
>> reversed?   If so, then the memory hotplug must have got a
>> replacement/substitution for this removal of pgdat - is that correct?
>
> It's not about removal of this structure but a removal of physical nodes
> when you hot-unplug the memory.  The kernel has to cope with that (unuse
> the page frames of the node about to be removed).
>
>        Hannes
>



--
Regards,
Peter Teoh



-- 
Regards,
Peter Teoh

--
To unsubscribe from this list: send an email with
"unsubscribe kernelnewbies" to ecartis@xxxxxxxxxxxx
Please read the FAQ at http://kernelnewbies.org/FAQ


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux