Re: [PATCH 00/23] drm: introduce drm_zalloc

2007-08-30 Thread Dave Airlie
>
> Note the slab has a memory tracking feature that accounts memory to
> callers of the allocator.  IF that's not enough for you please help
> improving the common code instead of inventing your own.

Christoph that code was written over 6-7 years ago, feel free to provide a 
patch for it to use the slab allocator, we only turn this code on though 
when developing new drivers, I don't think it ever gets used outside of 
that.. we don't need the overhead of the memory tracking in normal use..

Please stop implying that all the code in the drm is magically new and 
that we should be reusing kernel infrastructure that wasn't even written 
when the code first appeared.. or provide patches...

Dave.

-
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
--
___
Dri-devel mailing list
Dri-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dri-devel


Re: [PATCH 00/23] drm: introduce drm_zalloc

2007-08-30 Thread Kristian Høgsberg

On Tue, 2007-08-28 at 21:50 +0100, Dave Airlie wrote:
> On Tue, 28 Aug 2007, Christoph Hellwig wrote:
> 
> > On Mon, Aug 27, 2007 at 10:57:50PM +0200, [EMAIL PROTECTED] wrote:
> >> Hello,
> >>
> >>As there are many places in drm code where drm_alloc + memset is used
> >> this patch series introduces drm_zalloc and also makes use of drm_calloc 
> >> where
> >> needed. Most of these patches save some bytes so the benefit is a few kB 
> >> saved
> >> (gcc 4.1.2) with patch applied. Also some small (style, etc.) things are 
> >> fixed.
> >> This patch series does the conversion drm tree-wide. All patches were 
> >> compile
> >> tested.
> >
> > Please just convert it to plain kzalloc/kcalloc and kill these utterly 
> > useless
> > wrappers instead.
> >
> >
> 
> The wrappers aren't useless the drm alloc/free passes in a memory space 
> for debugging purposes so we can track memory abuse when developing,

Do we ever use that, though?  Having to pass in the pointer, the size
and the area just to free memory, sure is a bitch.

> but drm_zalloc shouldjust alias to drm_calloc really..

drm_calloc calls kcalloc which performs an integer overflow check on the
'n' and 'size' arguments, which isn't needed for drm_zalloc.  Small
detail, of course, but I don't see the problem with aliasing to kzalloc.

Kristian



-
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
--
___
Dri-devel mailing list
Dri-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dri-devel


Re: [PATCH 00/23] drm: introduce drm_zalloc

2007-08-30 Thread Christoph Hellwig
On Thu, Aug 30, 2007 at 12:20:32PM -0400, Kristian H?gsberg wrote:
> > The wrappers aren't useless the drm alloc/free passes in a memory space 
> > for debugging purposes so we can track memory abuse when developing,
> 
> Do we ever use that, though?  Having to pass in the pointer, the size
> and the area just to free memory, sure is a bitch.

Note the slab has a memory tracking feature that accounts memory to
callers of the allocator.  IF that's not enough for you please help
improving the common code instead of inventing your own.


-
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
--
___
Dri-devel mailing list
Dri-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dri-devel


Re: [PATCH 00/23] drm: introduce drm_zalloc

2007-08-28 Thread Dave Airlie
On Tue, 28 Aug 2007, Christoph Hellwig wrote:

> On Mon, Aug 27, 2007 at 10:57:50PM +0200, [EMAIL PROTECTED] wrote:
>> Hello,
>>
>>  As there are many places in drm code where drm_alloc + memset is used
>> this patch series introduces drm_zalloc and also makes use of drm_calloc 
>> where
>> needed. Most of these patches save some bytes so the benefit is a few kB 
>> saved
>> (gcc 4.1.2) with patch applied. Also some small (style, etc.) things are 
>> fixed.
>> This patch series does the conversion drm tree-wide. All patches were compile
>> tested.
>
> Please just convert it to plain kzalloc/kcalloc and kill these utterly useless
> wrappers instead.
>
>

The wrappers aren't useless the drm alloc/free passes in a memory space 
for debugging purposes so we can track memory abuse when developing,

but drm_zalloc shouldjust alias to drm_calloc really..

Dave.

-
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
--
___
Dri-devel mailing list
Dri-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dri-devel


Re: [PATCH 00/23] drm: introduce drm_zalloc

2007-08-28 Thread Christoph Hellwig
On Mon, Aug 27, 2007 at 10:57:50PM +0200, [EMAIL PROTECTED] wrote:
> Hello,
> 
>   As there are many places in drm code where drm_alloc + memset is used
> this patch series introduces drm_zalloc and also makes use of drm_calloc where
> needed. Most of these patches save some bytes so the benefit is a few kB saved
> (gcc 4.1.2) with patch applied. Also some small (style, etc.) things are 
> fixed.
> This patch series does the conversion drm tree-wide. All patches were compile
> tested.

Please just convert it to plain kzalloc/kcalloc and kill these utterly useless
wrappers instead.


-
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
--
___
Dri-devel mailing list
Dri-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dri-devel


[PATCH 00/23] drm: introduce drm_zalloc

2007-08-27 Thread m . kozlowski
Hello,

As there are many places in drm code where drm_alloc + memset is used
this patch series introduces drm_zalloc and also makes use of drm_calloc where
needed. Most of these patches save some bytes so the benefit is a few kB saved
(gcc 4.1.2) with patch applied. Also some small (style, etc.) things are fixed.
This patch series does the conversion drm tree-wide. All patches were compile
tested.

Patches are against 2.6.23-rc3-mm1. Please review and apply.

Regards,

Mariusz


-
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
--
___
Dri-devel mailing list
Dri-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dri-devel