과제/LG/2013/신희영 분석자료

Retired DISLab
이동: 둘러보기, 찾기


목차

신희영

2014년 4월 3일

   0403_책 요약
   0403_코드 분석

2014년 4월 5일

   0405_책 요약
   0405_코드 분석

2014년 4월 10일

   0410_코드 분석
   do_generic_file_read 함수

2014년 4월 14일

   0414_코드 분석
   mpage_readpage 함수

2014년 4월 26일

   read 분석
   read 함수의 흐름 (User - ext4)

2014년 4월 27일

   0427_structure
  
  • 분석한 전후의 소감도 기술해보거라.

2014년 4월 29일

  • address_space 구조체 / 14.04.29
address_space 구조체는 inode 구조체와 일대일의 관계이므로 이를 이용해 파일을 구분할 수 있다.
412 struct address_space {
413         struct inode            *host;          /* owner: inode, block_device */
414         struct radix_tree_root  page_tree;     '''//페이지 캐시를 관리하는 page구조체는 page_tree멤버와 연결되어 있다.''' /* radix tree of all pages */
'''//radix_tree 는 트리 구조의 일종으로 페이지 캐시의 index를 키로 하고 있어 파일 데이터가 캐시되어 있는지 빠르게 판정할 수 있다.'''
 
415         spinlock_t              tree_lock;      /* and lock protecting it */
416         unsigned int            i_mmap_writable;/* count VM_SHARED mappings */
417         struct rb_root          i_mmap;         /* tree of private and shared mappings */
418         struct list_head        i_mmap_nonlinear;/*list VM_NONLINEAR mappings */
419         struct mutex            i_mmap_mutex;   /* protect tree, count, list */
420         /* Protected by tree_lock together with the radix tree */
421         unsigned long           nrpages;        /* number of total pages */
422         pgoff_t                 writeback_index;/* writeback starts here */
'''423         const struct address_space_operations *a_ops;   /* methods */'''
424         unsigned long           flags;          /* error bits/gfp mask */
425         struct backing_dev_info *backing_dev_info; /* device readahead, etc */
426         spinlock_t              private_lock;   /* for use by the address_space */
'''427         struct list_head        private_list;   // private_list로 연결되는 것은 buffer_head구조체이다.''' /* ditto */
428         void                    *private_data;  /* ditto */
429 } __attribute__((aligned(sizeof(long))));
  • buffer_head 구조체 / 14.04.29
53 /*
 54  * Historically, a buffer_head was used to map a single block
 55  * within a page, and of course as the unit of I/O through the
 56  * filesystem and block layers.  Nowadays the basic I/O unit
 57  * is the bio, and buffer_heads are used for extracting block
 58  * mappings (via a get_block_t call), for tracking state within
 59  * a page (via a page_mapping) and for wrapping bio submission
 60  * for backward compatibility reasons (e.g. submit_bh).
 61  */
 62 struct buffer_head {
 
'''//buffer_head 1개로 1개의 파일블록을 관리한다.
//page 구조체의 private멤버와 연결되어 있으므로 이 구조체의 존재 여부는 page구조체의 private멤버로 판단한다.'''
 
 63         unsigned long b_state;          // 상태 플래그 /* buffer state bitmap (see above) */
 64         struct buffer_head *b_this_page; '''// 같은 페이지의 buffer_head 구조체 리스트''' /* circular list of page's buffers */
 65         struct page *b_page;           '''//해당 버퍼블록이 속한 page구조체를 가리킨다.''' /* the page this bh is mapped to */
 66 
 67         sector_t b_blocknr;            '''//블록 번호''' /* start block number */
 68         size_t b_size;                  /* size of mapping */
 69         char *b_data;                  '''// 데이터를 가리키는 포인터로 페이지 상의 포인터이다.''' /* pointer to data within the page */
 70 
 71         struct block_device *b_bdev;
 72         bh_end_io_t *b_end_io;          /* I/O completion */
 73         void *b_private;                /* reserved for b_end_io */
 74         struct list_head b_assoc_buffers; /* associated with another mapping */
 75         struct address_space *b_assoc_map;     '''//블록 특수파일의 address_space구조체를 저장''' /* mapping this buffer is
 76                                                    associated with */
 77         atomic_t b_count;               /* users using this buffer_head */
 78 };

2014년 5월 9일

    do_generic_file_read 설명

2014년 5월 12일

    generic_file_aio_read설명
   generic_file_aio_read 함수

2014년 5월 14일

    generic_file_aio_read data_structure 그림


2014년 5월 16일

  read(User - ext4)
   read 분석
   read(User - ext4) with dataflow

2014년 5월 16일

read 분석

2014년 5월 30일

read 설명

개인 도구
이름공간
변수
행위
둘러보기
구성원
연구
연구실
기타
도구모음
인쇄/내보내기