* [PATCH] drm/i915: Tidy slab cache allocations
@ 2016-11-02 14:07 Tvrtko Ursulin
2016-11-02 14:45 ` ✓ Fi.CI.BAT: success for " Patchwork
` (2 more replies)
0 siblings, 3 replies; 7+ messages in thread
From: Tvrtko Ursulin @ 2016-11-02 14:07 UTC (permalink / raw)
To: Intel-gfx
From: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
We can use the preferred KMEM_CACHE helper for brevity.
Also simplifiy error unwind by only setting the ENOMEM
error code once.
Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
---
drivers/gpu/drm/i915/i915_gem.c | 23 ++++++-----------------
1 file changed, 6 insertions(+), 17 deletions(-)
diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c
index 5839bebba64a..a6da5b55764a 100644
--- a/drivers/gpu/drm/i915/i915_gem.c
+++ b/drivers/gpu/drm/i915/i915_gem.c
@@ -4716,33 +4716,22 @@ i915_gem_load_init(struct drm_device *dev)
struct drm_i915_private *dev_priv = to_i915(dev);
int err;
- dev_priv->objects =
- kmem_cache_create("i915_gem_object",
- sizeof(struct drm_i915_gem_object), 0,
- SLAB_HWCACHE_ALIGN,
- NULL);
+ dev_priv->objects = KMEM_CACHE(drm_i915_gem_object, SLAB_HWCACHE_ALIGN);
if (!dev_priv->objects) {
err = -ENOMEM;
goto err_out;
}
- dev_priv->vmas =
- kmem_cache_create("i915_gem_vma",
- sizeof(struct i915_vma), 0,
- SLAB_HWCACHE_ALIGN,
- NULL);
+ dev_priv->vmas = KMEM_CACHE(i915_vma, SLAB_HWCACHE_ALIGN);
if (!dev_priv->vmas) {
err = -ENOMEM;
goto err_objects;
}
- dev_priv->requests =
- kmem_cache_create("i915_gem_request",
- sizeof(struct drm_i915_gem_request), 0,
- SLAB_HWCACHE_ALIGN |
- SLAB_RECLAIM_ACCOUNT |
- SLAB_DESTROY_BY_RCU,
- NULL);
+ dev_priv->requests = KMEM_CACHE(drm_i915_gem_request,
+ SLAB_HWCACHE_ALIGN |
+ SLAB_RECLAIM_ACCOUNT |
+ SLAB_DESTROY_BY_RCU);
if (!dev_priv->requests) {
err = -ENOMEM;
goto err_vmas;
--
2.7.4
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply related [flat|nested] 7+ messages in thread
* ✓ Fi.CI.BAT: success for drm/i915: Tidy slab cache allocations
2016-11-02 14:07 [PATCH] drm/i915: Tidy slab cache allocations Tvrtko Ursulin
@ 2016-11-02 14:45 ` Patchwork
2016-11-02 14:53 ` [PATCH] " Joonas Lahtinen
2016-11-02 16:45 ` ✗ Fi.CI.BAT: warning for drm/i915: Tidy slab cache allocations (rev2) Patchwork
2 siblings, 0 replies; 7+ messages in thread
From: Patchwork @ 2016-11-02 14:45 UTC (permalink / raw)
To: Tvrtko Ursulin; +Cc: intel-gfx
== Series Details ==
Series: drm/i915: Tidy slab cache allocations
URL : https://patchwork.freedesktop.org/series/14731/
State : success
== Summary ==
Series 14731v1 drm/i915: Tidy slab cache allocations
https://patchwork.freedesktop.org/api/1.0/series/14731/revisions/1/mbox/
Test kms_flip:
Subgroup basic-flip-vs-wf_vblank:
skip -> PASS (fi-byt-n2820)
Test kms_force_connector_basic:
Subgroup force-connector-state:
dmesg-warn -> PASS (fi-snb-2520m)
Test kms_pipe_crc_basic:
Subgroup suspend-read-crc-pipe-b:
incomplete -> PASS (fi-snb-2600)
fi-bdw-5557u total:241 pass:226 dwarn:0 dfail:0 fail:0 skip:15
fi-bsw-n3050 total:241 pass:201 dwarn:0 dfail:0 fail:0 skip:40
fi-bxt-t5700 total:241 pass:213 dwarn:0 dfail:0 fail:0 skip:28
fi-byt-j1900 total:241 pass:213 dwarn:0 dfail:0 fail:0 skip:28
fi-byt-n2820 total:241 pass:209 dwarn:0 dfail:0 fail:0 skip:32
fi-hsw-4770 total:241 pass:221 dwarn:0 dfail:0 fail:0 skip:20
fi-hsw-4770r total:241 pass:220 dwarn:0 dfail:0 fail:0 skip:21
fi-ilk-650 total:241 pass:187 dwarn:0 dfail:0 fail:0 skip:54
fi-ivb-3520m total:241 pass:218 dwarn:0 dfail:0 fail:0 skip:23
fi-ivb-3770 total:241 pass:218 dwarn:0 dfail:0 fail:0 skip:23
fi-kbl-7200u total:241 pass:219 dwarn:0 dfail:0 fail:0 skip:22
fi-skl-6260u total:241 pass:227 dwarn:0 dfail:0 fail:0 skip:14
fi-skl-6700hq total:241 pass:220 dwarn:0 dfail:0 fail:0 skip:21
fi-skl-6700k total:241 pass:219 dwarn:1 dfail:0 fail:0 skip:21
fi-skl-6770hq total:241 pass:227 dwarn:0 dfail:0 fail:0 skip:14
fi-snb-2520m total:241 pass:208 dwarn:0 dfail:0 fail:0 skip:33
fi-snb-2600 total:241 pass:207 dwarn:0 dfail:0 fail:0 skip:34
72d7f92850af037485a5ad6bc820d26a9ee97cd6 drm-intel-nightly: 2016y-11m-02d-13h-17m-31s UTC integration manifest
c4bb4e3 drm/i915: Tidy slab cache allocations
== Logs ==
For more details see: https://intel-gfx-ci.01.org/CI/Patchwork_2890/
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] drm/i915: Tidy slab cache allocations
2016-11-02 14:07 [PATCH] drm/i915: Tidy slab cache allocations Tvrtko Ursulin
2016-11-02 14:45 ` ✓ Fi.CI.BAT: success for " Patchwork
@ 2016-11-02 14:53 ` Joonas Lahtinen
2016-11-02 15:14 ` [PATCH v2] " Tvrtko Ursulin
2016-11-02 16:45 ` ✗ Fi.CI.BAT: warning for drm/i915: Tidy slab cache allocations (rev2) Patchwork
2 siblings, 1 reply; 7+ messages in thread
From: Joonas Lahtinen @ 2016-11-02 14:53 UTC (permalink / raw)
To: Tvrtko Ursulin, Intel-gfx
On ke, 2016-11-02 at 14:07 +0000, Tvrtko Ursulin wrote:
> From: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
>
> We can use the preferred KMEM_CACHE helper for brevity.
>
> Also simplifiy error unwind by only setting the ENOMEM
> error code once.
You did not do this part in this patch.
>
> Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Nice cleanup. For the KMEM_CACHE itself;
Reviewed-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Regards, Joonas
--
Joonas Lahtinen
Open Source Technology Center
Intel Corporation
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH v2] drm/i915: Tidy slab cache allocations
2016-11-02 14:53 ` [PATCH] " Joonas Lahtinen
@ 2016-11-02 15:14 ` Tvrtko Ursulin
2016-11-02 15:32 ` Joonas Lahtinen
0 siblings, 1 reply; 7+ messages in thread
From: Tvrtko Ursulin @ 2016-11-02 15:14 UTC (permalink / raw)
To: Intel-gfx
From: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
We can use the preferred KMEM_CACHE helper for brevity.
Also simplifiy error unwind by only setting the ENOMEM
error code once.
v2: Add forgotten changes. (Joonas Lahtinen)
Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Reviewed-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com> (v1)
Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
---
drivers/gpu/drm/i915/i915_gem.c | 37 ++++++++++---------------------------
1 file changed, 10 insertions(+), 27 deletions(-)
diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c
index 5839bebba64a..1f995ced524e 100644
--- a/drivers/gpu/drm/i915/i915_gem.c
+++ b/drivers/gpu/drm/i915/i915_gem.c
@@ -4714,39 +4714,22 @@ int
i915_gem_load_init(struct drm_device *dev)
{
struct drm_i915_private *dev_priv = to_i915(dev);
- int err;
+ int err = -ENOMEM;
- dev_priv->objects =
- kmem_cache_create("i915_gem_object",
- sizeof(struct drm_i915_gem_object), 0,
- SLAB_HWCACHE_ALIGN,
- NULL);
- if (!dev_priv->objects) {
- err = -ENOMEM;
+ dev_priv->objects = KMEM_CACHE(drm_i915_gem_object, SLAB_HWCACHE_ALIGN);
+ if (!dev_priv->objects)
goto err_out;
- }
- dev_priv->vmas =
- kmem_cache_create("i915_gem_vma",
- sizeof(struct i915_vma), 0,
- SLAB_HWCACHE_ALIGN,
- NULL);
- if (!dev_priv->vmas) {
- err = -ENOMEM;
+ dev_priv->vmas = KMEM_CACHE(i915_vma, SLAB_HWCACHE_ALIGN);
+ if (!dev_priv->vmas)
goto err_objects;
- }
- dev_priv->requests =
- kmem_cache_create("i915_gem_request",
- sizeof(struct drm_i915_gem_request), 0,
- SLAB_HWCACHE_ALIGN |
- SLAB_RECLAIM_ACCOUNT |
- SLAB_DESTROY_BY_RCU,
- NULL);
- if (!dev_priv->requests) {
- err = -ENOMEM;
+ dev_priv->requests = KMEM_CACHE(drm_i915_gem_request,
+ SLAB_HWCACHE_ALIGN |
+ SLAB_RECLAIM_ACCOUNT |
+ SLAB_DESTROY_BY_RCU);
+ if (!dev_priv->requests)
goto err_vmas;
- }
mutex_lock(&dev_priv->drm.struct_mutex);
INIT_LIST_HEAD(&dev_priv->gt.timelines);
--
2.7.4
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH v2] drm/i915: Tidy slab cache allocations
2016-11-02 15:14 ` [PATCH v2] " Tvrtko Ursulin
@ 2016-11-02 15:32 ` Joonas Lahtinen
0 siblings, 0 replies; 7+ messages in thread
From: Joonas Lahtinen @ 2016-11-02 15:32 UTC (permalink / raw)
To: Tvrtko Ursulin, Intel-gfx
On ke, 2016-11-02 at 15:14 +0000, Tvrtko Ursulin wrote:
> From: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
>
> We can use the preferred KMEM_CACHE helper for brevity.
>
> Also simplifiy error unwind by only setting the ENOMEM
> error code once.
>
> v2: Add forgotten changes. (Joonas Lahtinen)
>
> Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
> Reviewed-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com> (v1)
Reviewed-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
> Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
--
Joonas Lahtinen
Open Source Technology Center
Intel Corporation
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 7+ messages in thread
* ✗ Fi.CI.BAT: warning for drm/i915: Tidy slab cache allocations (rev2)
2016-11-02 14:07 [PATCH] drm/i915: Tidy slab cache allocations Tvrtko Ursulin
2016-11-02 14:45 ` ✓ Fi.CI.BAT: success for " Patchwork
2016-11-02 14:53 ` [PATCH] " Joonas Lahtinen
@ 2016-11-02 16:45 ` Patchwork
2016-11-03 13:54 ` Tvrtko Ursulin
2 siblings, 1 reply; 7+ messages in thread
From: Patchwork @ 2016-11-02 16:45 UTC (permalink / raw)
To: Tvrtko Ursulin; +Cc: intel-gfx
== Series Details ==
Series: drm/i915: Tidy slab cache allocations (rev2)
URL : https://patchwork.freedesktop.org/series/14731/
State : warning
== Summary ==
Series 14731v2 drm/i915: Tidy slab cache allocations
https://patchwork.freedesktop.org/api/1.0/series/14731/revisions/2/mbox/
Test drv_module_reload_basic:
pass -> DMESG-WARN (fi-skl-6770hq)
fi-bdw-5557u total:241 pass:226 dwarn:0 dfail:0 fail:0 skip:15
fi-bsw-n3050 total:241 pass:201 dwarn:0 dfail:0 fail:0 skip:40
fi-bxt-t5700 total:241 pass:213 dwarn:0 dfail:0 fail:0 skip:28
fi-byt-j1900 total:241 pass:213 dwarn:0 dfail:0 fail:0 skip:28
fi-byt-n2820 total:241 pass:209 dwarn:0 dfail:0 fail:0 skip:32
fi-hsw-4770 total:241 pass:221 dwarn:0 dfail:0 fail:0 skip:20
fi-hsw-4770r total:241 pass:220 dwarn:0 dfail:0 fail:0 skip:21
fi-ilk-650 total:241 pass:187 dwarn:0 dfail:0 fail:0 skip:54
fi-ivb-3520m total:241 pass:218 dwarn:0 dfail:0 fail:0 skip:23
fi-ivb-3770 total:241 pass:218 dwarn:0 dfail:0 fail:0 skip:23
fi-kbl-7200u total:241 pass:219 dwarn:0 dfail:0 fail:0 skip:22
fi-skl-6260u total:241 pass:227 dwarn:0 dfail:0 fail:0 skip:14
fi-skl-6700hq total:241 pass:220 dwarn:0 dfail:0 fail:0 skip:21
fi-skl-6700k total:241 pass:219 dwarn:1 dfail:0 fail:0 skip:21
fi-skl-6770hq total:241 pass:226 dwarn:1 dfail:0 fail:0 skip:14
fi-snb-2520m total:241 pass:208 dwarn:0 dfail:0 fail:0 skip:33
fi-snb-2600 total:241 pass:207 dwarn:0 dfail:0 fail:0 skip:34
bf6b989af8b0fde56a352d9005c97b2d8e3bbbe3 drm-intel-nightly: 2016y-11m-02d-15h-44m-03s UTC integration manifest
eb3aa67 drm/i915: Tidy slab cache allocations
== Logs ==
For more details see: https://intel-gfx-ci.01.org/CI/Patchwork_2891/
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: ✗ Fi.CI.BAT: warning for drm/i915: Tidy slab cache allocations (rev2)
2016-11-02 16:45 ` ✗ Fi.CI.BAT: warning for drm/i915: Tidy slab cache allocations (rev2) Patchwork
@ 2016-11-03 13:54 ` Tvrtko Ursulin
0 siblings, 0 replies; 7+ messages in thread
From: Tvrtko Ursulin @ 2016-11-03 13:54 UTC (permalink / raw)
To: intel-gfx, Tvrtko Ursulin
On 02/11/2016 16:45, Patchwork wrote:
> == Series Details ==
>
> Series: drm/i915: Tidy slab cache allocations (rev2)
> URL : https://patchwork.freedesktop.org/series/14731/
> State : warning
>
> == Summary ==
>
> Series 14731v2 drm/i915: Tidy slab cache allocations
> https://patchwork.freedesktop.org/api/1.0/series/14731/revisions/2/mbox/
>
> Test drv_module_reload_basic:
> pass -> DMESG-WARN (fi-skl-6770hq)
Just LSPCON... https://bugs.freedesktop.org/show_bug.cgi?id=98353
>
> fi-bdw-5557u total:241 pass:226 dwarn:0 dfail:0 fail:0 skip:15
> fi-bsw-n3050 total:241 pass:201 dwarn:0 dfail:0 fail:0 skip:40
> fi-bxt-t5700 total:241 pass:213 dwarn:0 dfail:0 fail:0 skip:28
> fi-byt-j1900 total:241 pass:213 dwarn:0 dfail:0 fail:0 skip:28
> fi-byt-n2820 total:241 pass:209 dwarn:0 dfail:0 fail:0 skip:32
> fi-hsw-4770 total:241 pass:221 dwarn:0 dfail:0 fail:0 skip:20
> fi-hsw-4770r total:241 pass:220 dwarn:0 dfail:0 fail:0 skip:21
> fi-ilk-650 total:241 pass:187 dwarn:0 dfail:0 fail:0 skip:54
> fi-ivb-3520m total:241 pass:218 dwarn:0 dfail:0 fail:0 skip:23
> fi-ivb-3770 total:241 pass:218 dwarn:0 dfail:0 fail:0 skip:23
> fi-kbl-7200u total:241 pass:219 dwarn:0 dfail:0 fail:0 skip:22
> fi-skl-6260u total:241 pass:227 dwarn:0 dfail:0 fail:0 skip:14
> fi-skl-6700hq total:241 pass:220 dwarn:0 dfail:0 fail:0 skip:21
> fi-skl-6700k total:241 pass:219 dwarn:1 dfail:0 fail:0 skip:21
> fi-skl-6770hq total:241 pass:226 dwarn:1 dfail:0 fail:0 skip:14
> fi-snb-2520m total:241 pass:208 dwarn:0 dfail:0 fail:0 skip:33
> fi-snb-2600 total:241 pass:207 dwarn:0 dfail:0 fail:0 skip:34
>
> bf6b989af8b0fde56a352d9005c97b2d8e3bbbe3 drm-intel-nightly: 2016y-11m-02d-15h-44m-03s UTC integration manifest
> eb3aa67 drm/i915: Tidy slab cache allocations
>
Merged to dinq, thanks for the review!
Regards,
Tvrtko
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2016-11-03 13:54 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-11-02 14:07 [PATCH] drm/i915: Tidy slab cache allocations Tvrtko Ursulin
2016-11-02 14:45 ` ✓ Fi.CI.BAT: success for " Patchwork
2016-11-02 14:53 ` [PATCH] " Joonas Lahtinen
2016-11-02 15:14 ` [PATCH v2] " Tvrtko Ursulin
2016-11-02 15:32 ` Joonas Lahtinen
2016-11-02 16:45 ` ✗ Fi.CI.BAT: warning for drm/i915: Tidy slab cache allocations (rev2) Patchwork
2016-11-03 13:54 ` Tvrtko Ursulin
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).