All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: "Christian König" <ckoenig.leichtzumerken@gmail.com>,
	dri-devel@lists.freedesktop.org
Cc: ray.huang@amd.com, kbuild-all@lists.01.org
Subject: Re: [PATCH 3/3] drm/ttm: switch to per device LRU lock
Date: Tue, 16 Mar 2021 04:17:49 +0800	[thread overview]
Message-ID: <202103160400.CQSqqEkv-lkp@intel.com> (raw)
In-Reply-To: <20210315160422.152528-3-christian.koenig@amd.com>

[-- Attachment #1: Type: text/plain, Size: 4014 bytes --]

Hi "Christian,

I love your patch! Perhaps something to improve:

[auto build test WARNING on drm-tip/drm-tip]
[cannot apply to drm-intel/for-linux-next drm-exynos/exynos-drm-next tegra-drm/drm/tegra/for-next linus/master drm/drm-next v5.12-rc3 next-20210315]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]

url:    https://github.com/0day-ci/linux/commits/Christian-K-nig/drm-ttm-move-swapout-logic-around/20210316-000551
base:   git://anongit.freedesktop.org/drm/drm-tip drm-tip
config: x86_64-randconfig-m001-20210315 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>

smatch warnings:
drivers/gpu/drm/ttm/ttm_device.c:158 ttm_device_swapout() warn: inconsistent returns '&bdev->lru_lock'.
drivers/gpu/drm/ttm/ttm_bo.c:665 ttm_mem_evict_first() error: we previously assumed 'bo' could be null (see line 662)

vim +158 drivers/gpu/drm/ttm/ttm_device.c

70ae63f3a85b97 Christian König 2021-03-15  123  
70ae63f3a85b97 Christian König 2021-03-15  124  long ttm_device_swapout(struct ttm_device *bdev, struct ttm_operation_ctx *ctx,
70ae63f3a85b97 Christian König 2021-03-15  125  			gfp_t gfp_flags)
70ae63f3a85b97 Christian König 2021-03-15  126  {
70ae63f3a85b97 Christian König 2021-03-15  127  	struct ttm_resource_manager *man;
824dca26fe3958 Christian König 2021-03-15  128  	struct ttm_buffer_object *bo;
70ae63f3a85b97 Christian König 2021-03-15  129  	unsigned i, j;
824dca26fe3958 Christian König 2021-03-15  130  	int ret;
824dca26fe3958 Christian König 2021-03-15  131  
1ed8d8fc515b90 Christian König 2021-03-15  132  	spin_lock(&bdev->lru_lock);
70ae63f3a85b97 Christian König 2021-03-15  133  	for (i = TTM_PL_SYSTEM; i < TTM_NUM_MEM_TYPES; ++i) {
70ae63f3a85b97 Christian König 2021-03-15  134  		man = ttm_manager_type(bdev, i);
70ae63f3a85b97 Christian König 2021-03-15  135  		if (!man || !man->use_tt)
70ae63f3a85b97 Christian König 2021-03-15  136  			continue;
70ae63f3a85b97 Christian König 2021-03-15  137  
70ae63f3a85b97 Christian König 2021-03-15  138  		for (j = 0; j < TTM_MAX_BO_PRIORITY; ++j) {
70ae63f3a85b97 Christian König 2021-03-15  139  			list_for_each_entry(bo, &man->lru[j], lru) {
70ae63f3a85b97 Christian König 2021-03-15  140  				long num_pages;
824dca26fe3958 Christian König 2021-03-15  141  
70ae63f3a85b97 Christian König 2021-03-15  142  				if (!bo->ttm ||
70ae63f3a85b97 Christian König 2021-03-15  143  				    bo->ttm->page_flags & TTM_PAGE_FLAG_SG ||
70ae63f3a85b97 Christian König 2021-03-15  144  				    bo->ttm->page_flags & TTM_PAGE_FLAG_SWAPPED)
70ae63f3a85b97 Christian König 2021-03-15  145  					continue;
70ae63f3a85b97 Christian König 2021-03-15  146  
70ae63f3a85b97 Christian König 2021-03-15  147  				num_pages = bo->ttm->num_pages;
824dca26fe3958 Christian König 2021-03-15  148  				ret = ttm_bo_swapout(bo, ctx, gfp_flags);
824dca26fe3958 Christian König 2021-03-15  149  				/* ttm_bo_swapout has dropped the lru_lock */
824dca26fe3958 Christian König 2021-03-15  150  				if (!ret)
824dca26fe3958 Christian König 2021-03-15  151  					return num_pages;
824dca26fe3958 Christian König 2021-03-15  152  				if (ret != -EBUSY)
824dca26fe3958 Christian König 2021-03-15  153  					return ret;
824dca26fe3958 Christian König 2021-03-15  154  			}
824dca26fe3958 Christian König 2021-03-15  155  		}
70ae63f3a85b97 Christian König 2021-03-15  156  	}
1ed8d8fc515b90 Christian König 2021-03-15  157  	spin_unlock(&bdev->lru_lock);
824dca26fe3958 Christian König 2021-03-15 @158  	return 0;
824dca26fe3958 Christian König 2021-03-15  159  }
70ae63f3a85b97 Christian König 2021-03-15  160  EXPORT_SYMBOL(ttm_device_swapout);
824dca26fe3958 Christian König 2021-03-15  161  

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 36557 bytes --]

[-- Attachment #3: Type: text/plain, Size: 160 bytes --]

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

WARNING: multiple messages have this Message-ID (diff)
From: kernel test robot <lkp@intel.com>
To: kbuild-all@lists.01.org
Subject: Re: [PATCH 3/3] drm/ttm: switch to per device LRU lock
Date: Tue, 16 Mar 2021 04:17:49 +0800	[thread overview]
Message-ID: <202103160400.CQSqqEkv-lkp@intel.com> (raw)
In-Reply-To: <20210315160422.152528-3-christian.koenig@amd.com>

[-- Attachment #1: Type: text/plain, Size: 4122 bytes --]

Hi "Christian,

I love your patch! Perhaps something to improve:

[auto build test WARNING on drm-tip/drm-tip]
[cannot apply to drm-intel/for-linux-next drm-exynos/exynos-drm-next tegra-drm/drm/tegra/for-next linus/master drm/drm-next v5.12-rc3 next-20210315]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]

url:    https://github.com/0day-ci/linux/commits/Christian-K-nig/drm-ttm-move-swapout-logic-around/20210316-000551
base:   git://anongit.freedesktop.org/drm/drm-tip drm-tip
config: x86_64-randconfig-m001-20210315 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>

smatch warnings:
drivers/gpu/drm/ttm/ttm_device.c:158 ttm_device_swapout() warn: inconsistent returns '&bdev->lru_lock'.
drivers/gpu/drm/ttm/ttm_bo.c:665 ttm_mem_evict_first() error: we previously assumed 'bo' could be null (see line 662)

vim +158 drivers/gpu/drm/ttm/ttm_device.c

70ae63f3a85b97 Christian König 2021-03-15  123  
70ae63f3a85b97 Christian König 2021-03-15  124  long ttm_device_swapout(struct ttm_device *bdev, struct ttm_operation_ctx *ctx,
70ae63f3a85b97 Christian König 2021-03-15  125  			gfp_t gfp_flags)
70ae63f3a85b97 Christian König 2021-03-15  126  {
70ae63f3a85b97 Christian König 2021-03-15  127  	struct ttm_resource_manager *man;
824dca26fe3958 Christian König 2021-03-15  128  	struct ttm_buffer_object *bo;
70ae63f3a85b97 Christian König 2021-03-15  129  	unsigned i, j;
824dca26fe3958 Christian König 2021-03-15  130  	int ret;
824dca26fe3958 Christian König 2021-03-15  131  
1ed8d8fc515b90 Christian König 2021-03-15  132  	spin_lock(&bdev->lru_lock);
70ae63f3a85b97 Christian König 2021-03-15  133  	for (i = TTM_PL_SYSTEM; i < TTM_NUM_MEM_TYPES; ++i) {
70ae63f3a85b97 Christian König 2021-03-15  134  		man = ttm_manager_type(bdev, i);
70ae63f3a85b97 Christian König 2021-03-15  135  		if (!man || !man->use_tt)
70ae63f3a85b97 Christian König 2021-03-15  136  			continue;
70ae63f3a85b97 Christian König 2021-03-15  137  
70ae63f3a85b97 Christian König 2021-03-15  138  		for (j = 0; j < TTM_MAX_BO_PRIORITY; ++j) {
70ae63f3a85b97 Christian König 2021-03-15  139  			list_for_each_entry(bo, &man->lru[j], lru) {
70ae63f3a85b97 Christian König 2021-03-15  140  				long num_pages;
824dca26fe3958 Christian König 2021-03-15  141  
70ae63f3a85b97 Christian König 2021-03-15  142  				if (!bo->ttm ||
70ae63f3a85b97 Christian König 2021-03-15  143  				    bo->ttm->page_flags & TTM_PAGE_FLAG_SG ||
70ae63f3a85b97 Christian König 2021-03-15  144  				    bo->ttm->page_flags & TTM_PAGE_FLAG_SWAPPED)
70ae63f3a85b97 Christian König 2021-03-15  145  					continue;
70ae63f3a85b97 Christian König 2021-03-15  146  
70ae63f3a85b97 Christian König 2021-03-15  147  				num_pages = bo->ttm->num_pages;
824dca26fe3958 Christian König 2021-03-15  148  				ret = ttm_bo_swapout(bo, ctx, gfp_flags);
824dca26fe3958 Christian König 2021-03-15  149  				/* ttm_bo_swapout has dropped the lru_lock */
824dca26fe3958 Christian König 2021-03-15  150  				if (!ret)
824dca26fe3958 Christian König 2021-03-15  151  					return num_pages;
824dca26fe3958 Christian König 2021-03-15  152  				if (ret != -EBUSY)
824dca26fe3958 Christian König 2021-03-15  153  					return ret;
824dca26fe3958 Christian König 2021-03-15  154  			}
824dca26fe3958 Christian König 2021-03-15  155  		}
70ae63f3a85b97 Christian König 2021-03-15  156  	}
1ed8d8fc515b90 Christian König 2021-03-15  157  	spin_unlock(&bdev->lru_lock);
824dca26fe3958 Christian König 2021-03-15 @158  	return 0;
824dca26fe3958 Christian König 2021-03-15  159  }
70ae63f3a85b97 Christian König 2021-03-15  160  EXPORT_SYMBOL(ttm_device_swapout);
824dca26fe3958 Christian König 2021-03-15  161  

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org

[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 36557 bytes --]

  reply	other threads:[~2021-03-15 20:18 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-15 16:04 [PATCH 1/3] drm/ttm: move swapout logic around Christian König
2021-03-15 16:04 ` [PATCH 2/3] drm/ttm: remove swap LRU v2 Christian König
2021-03-15 18:54   ` kernel test robot
2021-03-15 18:54     ` kernel test robot
2021-03-15 18:54   ` Matthew Auld
2021-03-15 19:27     ` Christian König
2021-03-15 16:04 ` [PATCH 3/3] drm/ttm: switch to per device LRU lock Christian König
2021-03-15 20:17   ` kernel test robot [this message]
2021-03-15 20:17     ` kernel test robot
2021-03-16  9:35   ` Daniel Vetter
2021-03-16 12:03     ` Christian König
2021-03-16 12:05       ` Daniel Vetter
2021-03-16 15:13         ` Christian König
2021-03-15 18:47 ` [PATCH 1/3] drm/ttm: move swapout logic around kernel test robot
2021-03-15 18:47   ` kernel test robot
2021-03-19  9:41 ` kernel test robot
2021-03-19  9:41   ` kernel test robot
  -- strict thread matches above, loose matches on Subject: below --
2021-03-18 12:47 [PATCH 1/3] drm/ttm: move swapout logic around v2 Christian König
2021-03-18 12:47 ` [PATCH 3/3] drm/ttm: switch to per device LRU lock Christian König
2021-03-19  4:32   ` Huang Rui
2021-03-19 12:10     ` Christian König
2021-03-22  7:13       ` Huang Rui
2021-02-11 13:29 [PATCH 1/3] drm/ttm: move swapout logic around Christian König
2021-02-11 13:29 ` [PATCH 3/3] drm/ttm: switch to per device LRU lock Christian König
2021-02-10 23:28 kernel test robot
2021-02-10 15:21 [PATCH 1/3] drm/ttm: move swapout logic around Christian König
2021-02-10 15:21 ` [PATCH 3/3] drm/ttm: switch to per device LRU lock Christian König

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=202103160400.CQSqqEkv-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=ckoenig.leichtzumerken@gmail.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=kbuild-all@lists.01.org \
    --cc=ray.huang@amd.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.