Uploaded image for project: 'Lustre'
  1. Lustre
  2. LU-18736

pool_add_objects order 0 support for OBD_ALLOC_LARGE

Details

    • Bug
    • Resolution: Unresolved
    • Critical
    • None
    • Lustre 2.14.0, Lustre 2.16.1
    • None
    • 3
    • 9223372036854775807

    Description

      static int pool_add_objects(int nobjects, struct obd_page_pool *page_pool)
      {
      ...
              for (i = 0; i < nptr_pages; i++) {
                      OBD_ALLOC(ptr_pages[i], PAGE_SIZE);
                      if (ptr_pages[i] == NULL)
                              goto out_ptr_pages;
      
      
                      for (j = 0; j < PTRS_PER_PAGE && alloced < nobjects; j++) {
                              if (pool_order == 0)
                                      ptr_pages[i][j] = alloc_page(GFP_NOFS |
                                              __GFP_HIGHMEM);
                              else {
                                      OBD_ALLOC_LARGE(ptr_pages[i][j],
                                              object_size(page_pool));
                              }    
                              if (ptr_pages[i][j] == NULL)
                                      goto out_ptr_pages;
      
      
                              alloced++;
                      }    
              }     

      If pool_add_objects would be called from obd_pool_get_objects it is expected that it stores the address of buffer in ptr_pages[i][j] instead of pointer to page.

      It is especially critical FOR CSDC with aarch64 + 64K pages on clients. 

      Attachments

        Issue Links

          Activity

            [LU-18736] pool_add_objects order 0 support for OBD_ALLOC_LARGE
            adilger Andreas Dilger made changes -
            Link New: This issue is related to LU-18691 [ LU-18691 ]
            adilger Andreas Dilger made changes -
            Link New: This issue is related to DCO-10207 [ DCO-10207 ]
            adilger Andreas Dilger made changes -
            Affects Version/s New: Lustre 2.16.1 [ 16820 ]
            Affects Version/s New: Lustre 2.14.0 [ 14490 ]
            adilger Andreas Dilger made changes -
            Priority Original: Minor [ 4 ] New: Critical [ 2 ]
            scherementsev Sergey Cheremencev made changes -
            Description Original: {noformat}
            static int pool_add_objects(int nobjects, struct obd_page_pool *page_pool)
            {
            ...
                    for (i = 0; i < nptr_pages; i++) {
                            OBD_ALLOC(ptr_pages[i], PAGE_SIZE);
                            if (ptr_pages[i] == NULL)
                                    goto out_ptr_pages;


                            for (j = 0; j < PTRS_PER_PAGE && alloced < nobjects; j++) {
                                    if (pool_order == 0)
                                            ptr_pages[i][j] = alloc_page(GFP_NOFS |
                                                    __GFP_HIGHMEM);
                                    else {
                                            OBD_ALLOC_LARGE(ptr_pages[i][j],
                                                    object_size(page_pool));
                                    }    
                                    if (ptr_pages[i][j] == NULL)
                                            goto out_ptr_pages;


                                    alloced++;
                            }    
                    }     {noformat}
            If pool_add_objects would be called from obd_pool_get_objects it is expected that it stores the address of buffer in ptr_pages[i][j] instead of pointer to page.
            New: {noformat}
            static int pool_add_objects(int nobjects, struct obd_page_pool *page_pool)
            {
            ...
                    for (i = 0; i < nptr_pages; i++) {
                            OBD_ALLOC(ptr_pages[i], PAGE_SIZE);
                            if (ptr_pages[i] == NULL)
                                    goto out_ptr_pages;


                            for (j = 0; j < PTRS_PER_PAGE && alloced < nobjects; j++) {
                                    if (pool_order == 0)
                                            ptr_pages[i][j] = alloc_page(GFP_NOFS |
                                                    __GFP_HIGHMEM);
                                    else {
                                            OBD_ALLOC_LARGE(ptr_pages[i][j],
                                                    object_size(page_pool));
                                    }    
                                    if (ptr_pages[i][j] == NULL)
                                            goto out_ptr_pages;


                                    alloced++;
                            }    
                    }     {noformat}
            If pool_add_objects would be called from obd_pool_get_objects it is expected that it stores the address of buffer in ptr_pages[i][j] instead of pointer to page.

            It is especially critical FOR CSDC with aarch64 + 64K pages on clients. 
            scherementsev Sergey Cheremencev created issue -

            People

              scherementsev Sergey Cheremencev
              scherementsev Sergey Cheremencev
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated: