Re: [PATCH] drm/ttm: check if free mem space is under the lower limit

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

 



Hi Roger,

I love your patch! Yet something to improve:

[auto build test ERROR on drm/drm-next]
[also build test ERROR on v4.16-rc2 next-20180222]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]

url:    https://github.com/0day-ci/linux/commits/Roger-He/drm-ttm-check-if-free-mem-space-is-under-the-lower-limit/20180223-132039
base:   git://people.freedesktop.org/~airlied/linux.git drm-next
config: i386-randconfig-x019-201807 (attached as .config)
compiler: gcc-7 (Debian 7.3.0-1) 7.3.0
reproduce:
        # save the attached .config to linux build tree
        make ARCH=i386 

All errors (new ones prefixed by >>):

   drivers/gpu//drm/ttm/ttm_memory.c: In function 'ttm_check_under_lowerlimit':
>> drivers/gpu//drm/ttm/ttm_memory.c:554:9: error: 'struct ttm_operation_ctx' has no member named 'flags'
     if (ctx->flags & TTM_OPT_FLAG_FORCE_ALLOC)
            ^~
>> drivers/gpu//drm/ttm/ttm_memory.c:554:19: error: 'TTM_OPT_FLAG_FORCE_ALLOC' undeclared (first use in this function); did you mean 'TTM_PAGE_FLAG_ZERO_ALLOC'?
     if (ctx->flags & TTM_OPT_FLAG_FORCE_ALLOC)
                      ^~~~~~~~~~~~~~~~~~~~~~~~
                      TTM_PAGE_FLAG_ZERO_ALLOC
   drivers/gpu//drm/ttm/ttm_memory.c:554:19: note: each undeclared identifier is reported only once for each function it appears in

vim +554 drivers/gpu//drm/ttm/ttm_memory.c

   535	
   536	/*
   537	 * check if the available mem is under lower memory limit
   538	 *
   539	 * a. if no swap disk at all or free swap space is under swap_mem_limit
   540	 * but available system mem is bigger than sys_mem_limit, allow TTM
   541	 * allocation;
   542	 *
   543	 * b. if the available system mem is less than sys_mem_limit but free
   544	 * swap disk is bigger than swap_mem_limit, allow TTM allocation.
   545	 */
   546	bool
   547	ttm_check_under_lowerlimit(struct ttm_mem_global *glob,
   548				uint64_t num_pages,
   549				struct ttm_operation_ctx *ctx)
   550	{
   551		bool ret = false;
   552		int64_t available;
   553	
 > 554		if (ctx->flags & TTM_OPT_FLAG_FORCE_ALLOC)
   555			return false;
   556	
   557		available = get_nr_swap_pages() + si_mem_available();
   558		available -= num_pages;
   559		if (available < glob->lower_mem_limit)
   560			ret = true;
   561	
   562		return ret;
   563	}
   564	EXPORT_SYMBOL(ttm_check_under_lowerlimit);
   565	

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

Attachment: .config.gz
Description: application/gzip

_______________________________________________
dri-devel mailing list
dri-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/dri-devel

[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux