10차 ARM 리눅스 커널 스터디 45주차(2014.03.08) 후기입니다.
# 일시 : 2014.03.08 (45주차)
# 모임명 : NAVER개발자커뮤니티지원_IAMROOT.ORG_10차ARM-C
# 장소 : 토즈 타워점
# 장소지원 : NAVER 개발자 커뮤니티 지원 프로그램
# 참여인원 : 5명
# 스터디 진도 : start_kernel()-> smp_prepare_boot_cpu(), build_all_zonelists(NULL,NULL);
# 스터디 내용 : smp_prepare_boot_cpu()
1. start_kernel()-> smp_prepare_boot_cpu()-> set_my_cpu_offset(per_cpu_offset(smp_processor_id()));
- smp_processor_id() : 0
- per_cpu_offset(0) : __per_cpu_offset[0]
- set_my_cpu_offset : pcpu_unit_offsets[0] + __per_cpu_offset 에서의 pcpu_base addr의 옵셋
- asm volatile("mcr p15, 0, %0, c13, c0, 4" : : "r" (off) : "memory");
- A.R.M: B4.1.150 참조, TPIFRPRW를 설정함
# 스터디 내용 : build_all_zonelists(NULL,NULL);
2. start_kernel()->build_all_zonelists(NULL,NULL);
- 함수의 인자 (pg_data_t *pgdat : NULL, struct zone *zone : NULL)
2.1 set_zonelist_order()
- current_zonelist_order : 2로 설정 (ZONELIST_ORDER_ZONE의 값)
2.2 system_state == SYSTEM_BOOTING 이므로 if문을 실행
- __build_all_zonelists(NULL);
- contig_page_data의 node_zonelist마다 값 설정
- 각 cpu core마다 boot_pageset의 pcp (per_cpu_pages) 맴버를 설정
- cpu: 0, per_cpu(boot_pageset, 0): *(&boot_pageset + __per_cpu_offset[0])
- cpu: 1, per_cpu(boot_pageset, 1): *(&boot_pageset + __per_cpu_offset[1])
- cpu: 2, per_cpu(boot_pageset, 2): *(&boot_pageset + __per_cpu_offset[2])
- cpu: 3, per_cpu(boot_pageset, 3): *(&boot_pageset + __per_cpu_offset[3])
- mminit_verify_zonelist();
- zonelists를 출력해 주는 함수지만, 처음 if문의 mminit_loglevel : 0 < MMINIT_VERIFY :1로 리턴됨
- set_mminit_log_level(char *str)로 실행할 mminit log level을 설정해 줄 수 있다.
- 실행시 출력 결과 : "mminit::zonelist thisnode nid값:zone->name"
- cpuset_init_current_mems_allowed();
- NULL 함수
2.3 vm_total_pages = nr_free_pagecache_pages();
- vm_total_pages : 0x7f7d6
2.4 if (vm_total_pages < (pageblock_nr_pages * MIGRATE_TYPES))
- vm_total_pages: 0x7f7d6, pageblock_nr_pages : 0x400, MIGRATE_TYPES: 4
- page_group_by_mobility_disabled: 0
2.5 zonelist결과 출력
- "Built 1 zonelists in Zone order, mobility grouping off."
- "Total pages: 0x7f7d6"
# git log
e768777..00c4bc9 master -> origin/master
Updating e768777..00c4bc9
Fast-forward
arch/arm/include/asm/barrier.h | 1 +
arch/arm/include/asm/percpu.h | 3 +
arch/arm/include/asm/thread_info.h | 1 +
arch/arm/kernel/smp.c | 2 +
arch/arm/kernel/vmlinux.lds.S | 5 +-
include/asm-generic/current.h | 3 +
include/asm-generic/percpu.h | 14 ++++
include/asm-generic/sections.h | 1 +
include/asm-generic/topology.h | 4 +-
include/asm-generic/vmlinux.lds.h | 6 ++
include/linux/compiler-gcc.h | 8 ++
include/linux/compiler.h | 1 +
include/linux/cpuset.h | 3 +-
include/linux/gfp.h | 96 +++++++++++++++++++++-
include/linux/kernel.h | 1 +
include/linux/mempolicy.h | 1 +
include/linux/mmzone.h | 62 +++++++++++++-
include/linux/nodemask.h | 9 +++
include/linux/pageblock-flags.h | 1 +
include/linux/percpu-defs.h | 13 ++-
include/linux/sched.h | 2 +-
include/linux/smp.h | 3 +-
include/linux/topology.h | 6 +-
init/main.c | 7 ++
kernel/bounds.c | 1 +
lib/smp_processor_id.c | 1 +
mm/bootmem.c | 2 +
mm/internal.h | 2 +
mm/mm_init.c | 7 +-
mm/mmzone.c | 14 ++++
mm/page_alloc.c | 184 ++++++++++++++++++++++++++++++++++++++++--
mm/percpu.c | 30 +++++++
mm/vmscan.c | 1 +
33 files changed, 470 insertions(+), 25 deletions(-)
# 46주차 진도는 page_alloc_init(); 부터 시작합니다.
댓글 없음:
댓글 쓰기