2003-08-10 13:25:00

by Frederick, Fabian

[permalink] [raw]
Subject: [PATCH] shm to sysfs rebuild.

Patrick,

Here's shm to sysfs rebuild following your advices :

Summary :

-Removing kobj_map
-Adding object memsetting rather than field/field NULL
-Declaring attributes global
-Adding pointer compare rather than string compare
-Removing unnecessary pressure on the stack
-Using kobj_type
-shm destruction moved to kobject release function
-id seek was trivial.Attrshow rewritten.
-Tested against recursive fgreps-kde-personal benchmark
program
-Removed might_sleep warning (shm_unlock was global lock to
kobject_registration (fs node lock)
-Checking release code in front of all shm_destroy calls.

Patch: http://fabian.unixtech.be/kernel/shmkobject090803.diff

It's against 2.6.0test2.If it's ok to you, could you apply ?

Regards,
Fabian


2003-08-10 17:18:49

by Patrick Mochel

[permalink] [raw]
Subject: Re: [PATCH] shm to sysfs rebuild.


> Patch: http://fabian.unixtech.be/kernel/shmkobject090803.diff
>
> It's against 2.6.0test2.If it's ok to you, could you apply ?

Could you please always inline your patches in your email? They stand a
much better chance of getting applied that way.

Thanks,


-pat

2003-08-14 13:03:54

by Frederick, Fabian

[permalink] [raw]
Subject: RE: [PATCH] shm to sysfs rebuild.

Patrick,

Here's the patch attached (patches are troublesome when inlined from
here).
btw all your advices were applied.

Regards,
Fabian

-----Message d'origine-----
De : Patrick Mochel [mailto:[email protected]]
Envoy? : dimanche 10 ao?t 2003 19:24
? : Frederick, Fabian
Cc : '[email protected]'
Objet : Re: [PATCH] shm to sysfs rebuild.



> Patch: http://fabian.unixtech.be/kernel/shmkobject090803.diff
>
> It's against 2.6.0test2.If it's ok to you, could you apply ?

Could you please always inline your patches in your email? They stand a
much better chance of getting applied that way.

Thanks,


-pat


Attachments:
shmkobject090803.diff (5.50 kB)

2003-08-15 00:24:23

by Greg KH

[permalink] [raw]
Subject: Re: [PATCH] shm to sysfs rebuild.

On Thu, Aug 14, 2003 at 03:03:43PM +0200, Frederick, Fabian wrote:
> Patrick,
>
> Here's the patch attached (patches are troublesome when inlined from
> here).
> btw all your advices were applied.

Don't you really want to clean up the shm information when the device is
closed (or however shm's are destroyed), and then later, when the
kobject is released, free up the memory assigned to it?

The patch really wasn't inlined, otherwise I would point this out in the
patch :)

thanks,

greg k-h