Re: [PATCH 2/25] NTFS: Allow highmem kmalloc() in ntfs_malloc_nofs() and add _nofail() version.

2005-09-09 Thread Horst von Brand
Anton Altaparmakov <[EMAIL PROTECTED]> wrote: > On Fri, 2005-09-09 at 15:02 +0300, Pekka J Enberg wrote: > > On Fri, 9 Sep 2005, Anton Altaparmakov wrote: > > > > I completely disagree with you given that this is not "inventing > > > > [...] own memory allocators", it is just a convenient short

Re: [PATCH 2/25] NTFS: Allow highmem kmalloc() in ntfs_malloc_nofs() and add _nofail() version.

2005-09-09 Thread Anton Altaparmakov
On Fri, 2005-09-09 at 15:53 +0100, Christoph Hellwig wrote: > On Fri, Sep 09, 2005 at 07:51:23AM -0700, Roland Dreier wrote: > > Anton> fs/ntfs/malloc.h::ntfs_malloc_nofs() to do the kmalloc() > > Anton> based allocations with __GFP_HIGHMEM, analogous to how the > > Anton> vmalloc()

Re: [PATCH 2/25] NTFS: Allow highmem kmalloc() in ntfs_malloc_nofs() and add _nofail() version.

2005-09-09 Thread Christoph Hellwig
On Fri, Sep 09, 2005 at 07:51:23AM -0700, Roland Dreier wrote: > Anton> fs/ntfs/malloc.h::ntfs_malloc_nofs() to do the kmalloc() > Anton> based allocations with __GFP_HIGHMEM, analogous to how the > Anton> vmalloc() based allocations are done. > > Does it make sense to pass

Re: [PATCH 2/25] NTFS: Allow highmem kmalloc() in ntfs_malloc_nofs() and add _nofail() version.

2005-09-09 Thread Roland Dreier
Anton> fs/ntfs/malloc.h::ntfs_malloc_nofs() to do the kmalloc() Anton> based allocations with __GFP_HIGHMEM, analogous to how the Anton> vmalloc() based allocations are done. Does it make sense to pass __GFP_HIGHMEM to kmalloc()? kmalloc() has to return memory from lowmem, since it

Re: [PATCH 2/25] NTFS: Allow highmem kmalloc() in ntfs_malloc_nofs() and add _nofail() version.

2005-09-09 Thread Anton Altaparmakov
On Fri, 2005-09-09 at 15:02 +0300, Pekka J Enberg wrote: > On Fri, 9 Sep 2005, Anton Altaparmakov wrote: > > > I completely disagree with you given that this is not "inventing [...] > > > own memory allocators", it is just a convenient short hand. I am sure a > > > lot of people would agree with

Re: [PATCH 2/25] NTFS: Allow highmem kmalloc() in ntfs_malloc_nofs() and add _nofail() version.

2005-09-09 Thread Pekka J Enberg
On Fri, 9 Sep 2005, Anton Altaparmakov wrote: > > I completely disagree with you given that this is not "inventing [...] > > own memory allocators", it is just a convenient short hand. I am sure a > > lot of people would agree with you though. It is just a matter of > > personal preference. > >

Re: [PATCH 2/25] NTFS: Allow highmem kmalloc() in ntfs_malloc_nofs() and add _nofail() version.

2005-09-09 Thread Anton Altaparmakov
On Fri, 2005-09-09 at 12:48 +0100, Anton Altaparmakov wrote: > On Fri, 2005-09-09 at 14:38 +0300, Pekka J Enberg wrote: > > On Fri, 9 Sep 2005, Anton Altaparmakov wrote: > > > They could be but I would rather not. What if one day I decide to > > > change how ntfs_malloc_nofs() works? Then it

Re: [PATCH 2/25] NTFS: Allow highmem kmalloc() in ntfs_malloc_nofs() and add _nofail() version.

2005-09-09 Thread Anton Altaparmakov
On Fri, 2005-09-09 at 14:38 +0300, Pekka J Enberg wrote: > On Fri, 9 Sep 2005, Anton Altaparmakov wrote: > > They could be but I would rather not. What if one day I decide to > > change how ntfs_malloc_nofs() works? Then it would be needed to > > carefully go through the whole driver looking

Re: [PATCH 2/25] NTFS: Allow highmem kmalloc() in ntfs_malloc_nofs() and add _nofail() version.

2005-09-09 Thread Pekka J Enberg
On Fri, 9 Sep 2005, Anton Altaparmakov wrote: > They could be but I would rather not. What if one day I decide to > change how ntfs_malloc_nofs() works? Then it would be needed to > carefully go through the whole driver looking for places where kmalloc > is used and change those, too. > > From

Re: [PATCH 2/25] NTFS: Allow highmem kmalloc() in ntfs_malloc_nofs() and add _nofail() version.

2005-09-09 Thread Anton Altaparmakov
On Fri, 2005-09-09 at 14:15 +0300, Pekka J Enberg wrote: > On Fri, 9 Sep 2005, Anton Altaparmakov wrote: > > Also note I only use the ntfs_malloc_nofs() wrapper if I have to. If I > > know how much I am allocating or at least know that the maximum is quite > > small, I use kmalloc() directly. It

Re: [PATCH 2/25] NTFS: Allow highmem kmalloc() in ntfs_malloc_nofs() and add _nofail() version.

2005-09-09 Thread Pekka J Enberg
On Fri, 9 Sep 2005, Anton Altaparmakov wrote: > Also note I only use the ntfs_malloc_nofs() wrapper if I have to. If I > know how much I am allocating or at least know that the maximum is quite > small, I use kmalloc() directly. It is pretty much only for the runlist > allocations that I use the

Re: [PATCH 2/25] NTFS: Allow highmem kmalloc() in ntfs_malloc_nofs() and add _nofail() version.

2005-09-09 Thread Anton Altaparmakov
On Fri, 2005-09-09 at 13:36 +0300, Pekka Enberg wrote: > On 9/9/05, Anton Altaparmakov <[EMAIL PROTECTED]> wrote: > > -static inline void *ntfs_malloc_nofs(unsigned long size) > > +static inline void *__ntfs_malloc(unsigned long size, > > + unsigned int __nocast gfp_mask) > > { > >

Re: [PATCH 2/25] NTFS: Allow highmem kmalloc() in ntfs_malloc_nofs() and add _nofail() version.

2005-09-09 Thread Pekka Enberg
On 9/9/05, Anton Altaparmakov <[EMAIL PROTECTED]> wrote: > -static inline void *ntfs_malloc_nofs(unsigned long size) > +static inline void *__ntfs_malloc(unsigned long size, > + unsigned int __nocast gfp_mask) > { > if (likely(size <= PAGE_SIZE)) { >

[PATCH 2/25] NTFS: Allow highmem kmalloc() in ntfs_malloc_nofs() and add _nofail() version.

2005-09-09 Thread Anton Altaparmakov
NTFS: Allow highmem kmalloc() in ntfs_malloc_nofs() and add _nofail() version. - Modify fs/ntfs/malloc.h::ntfs_malloc_nofs() to do the kmalloc() based allocations with __GFP_HIGHMEM, analogous to how the vmalloc() based allocations are done. - Add fs/ntfs/malloc.h::ntfs_malloc_nofs_nofail()

[PATCH 2/25] NTFS: Allow highmem kmalloc() in ntfs_malloc_nofs() and add _nofail() version.

2005-09-09 Thread Anton Altaparmakov
NTFS: Allow highmem kmalloc() in ntfs_malloc_nofs() and add _nofail() version. - Modify fs/ntfs/malloc.h::ntfs_malloc_nofs() to do the kmalloc() based allocations with __GFP_HIGHMEM, analogous to how the vmalloc() based allocations are done. - Add fs/ntfs/malloc.h::ntfs_malloc_nofs_nofail()

Re: [PATCH 2/25] NTFS: Allow highmem kmalloc() in ntfs_malloc_nofs() and add _nofail() version.

2005-09-09 Thread Pekka Enberg
On 9/9/05, Anton Altaparmakov [EMAIL PROTECTED] wrote: -static inline void *ntfs_malloc_nofs(unsigned long size) +static inline void *__ntfs_malloc(unsigned long size, + unsigned int __nocast gfp_mask) { if (likely(size = PAGE_SIZE)) { BUG_ON(!size);

Re: [PATCH 2/25] NTFS: Allow highmem kmalloc() in ntfs_malloc_nofs() and add _nofail() version.

2005-09-09 Thread Anton Altaparmakov
On Fri, 2005-09-09 at 13:36 +0300, Pekka Enberg wrote: On 9/9/05, Anton Altaparmakov [EMAIL PROTECTED] wrote: -static inline void *ntfs_malloc_nofs(unsigned long size) +static inline void *__ntfs_malloc(unsigned long size, + unsigned int __nocast gfp_mask) { if

Re: [PATCH 2/25] NTFS: Allow highmem kmalloc() in ntfs_malloc_nofs() and add _nofail() version.

2005-09-09 Thread Pekka J Enberg
On Fri, 9 Sep 2005, Anton Altaparmakov wrote: Also note I only use the ntfs_malloc_nofs() wrapper if I have to. If I know how much I am allocating or at least know that the maximum is quite small, I use kmalloc() directly. It is pretty much only for the runlist allocations that I use the

Re: [PATCH 2/25] NTFS: Allow highmem kmalloc() in ntfs_malloc_nofs() and add _nofail() version.

2005-09-09 Thread Anton Altaparmakov
On Fri, 2005-09-09 at 14:15 +0300, Pekka J Enberg wrote: On Fri, 9 Sep 2005, Anton Altaparmakov wrote: Also note I only use the ntfs_malloc_nofs() wrapper if I have to. If I know how much I am allocating or at least know that the maximum is quite small, I use kmalloc() directly. It is

Re: [PATCH 2/25] NTFS: Allow highmem kmalloc() in ntfs_malloc_nofs() and add _nofail() version.

2005-09-09 Thread Pekka J Enberg
On Fri, 9 Sep 2005, Anton Altaparmakov wrote: They could be but I would rather not. What if one day I decide to change how ntfs_malloc_nofs() works? Then it would be needed to carefully go through the whole driver looking for places where kmalloc is used and change those, too. From a

Re: [PATCH 2/25] NTFS: Allow highmem kmalloc() in ntfs_malloc_nofs() and add _nofail() version.

2005-09-09 Thread Anton Altaparmakov
On Fri, 2005-09-09 at 14:38 +0300, Pekka J Enberg wrote: On Fri, 9 Sep 2005, Anton Altaparmakov wrote: They could be but I would rather not. What if one day I decide to change how ntfs_malloc_nofs() works? Then it would be needed to carefully go through the whole driver looking for

Re: [PATCH 2/25] NTFS: Allow highmem kmalloc() in ntfs_malloc_nofs() and add _nofail() version.

2005-09-09 Thread Anton Altaparmakov
On Fri, 2005-09-09 at 12:48 +0100, Anton Altaparmakov wrote: On Fri, 2005-09-09 at 14:38 +0300, Pekka J Enberg wrote: On Fri, 9 Sep 2005, Anton Altaparmakov wrote: They could be but I would rather not. What if one day I decide to change how ntfs_malloc_nofs() works? Then it would be

Re: [PATCH 2/25] NTFS: Allow highmem kmalloc() in ntfs_malloc_nofs() and add _nofail() version.

2005-09-09 Thread Pekka J Enberg
On Fri, 9 Sep 2005, Anton Altaparmakov wrote: I completely disagree with you given that this is not inventing [...] own memory allocators, it is just a convenient short hand. I am sure a lot of people would agree with you though. It is just a matter of personal preference. I should

Re: [PATCH 2/25] NTFS: Allow highmem kmalloc() in ntfs_malloc_nofs() and add _nofail() version.

2005-09-09 Thread Anton Altaparmakov
On Fri, 2005-09-09 at 15:02 +0300, Pekka J Enberg wrote: On Fri, 9 Sep 2005, Anton Altaparmakov wrote: I completely disagree with you given that this is not inventing [...] own memory allocators, it is just a convenient short hand. I am sure a lot of people would agree with you though.

Re: [PATCH 2/25] NTFS: Allow highmem kmalloc() in ntfs_malloc_nofs() and add _nofail() version.

2005-09-09 Thread Roland Dreier
Anton fs/ntfs/malloc.h::ntfs_malloc_nofs() to do the kmalloc() Anton based allocations with __GFP_HIGHMEM, analogous to how the Anton vmalloc() based allocations are done. Does it make sense to pass __GFP_HIGHMEM to kmalloc()? kmalloc() has to return memory from lowmem, since it

Re: [PATCH 2/25] NTFS: Allow highmem kmalloc() in ntfs_malloc_nofs() and add _nofail() version.

2005-09-09 Thread Christoph Hellwig
On Fri, Sep 09, 2005 at 07:51:23AM -0700, Roland Dreier wrote: Anton fs/ntfs/malloc.h::ntfs_malloc_nofs() to do the kmalloc() Anton based allocations with __GFP_HIGHMEM, analogous to how the Anton vmalloc() based allocations are done. Does it make sense to pass __GFP_HIGHMEM to

Re: [PATCH 2/25] NTFS: Allow highmem kmalloc() in ntfs_malloc_nofs() and add _nofail() version.

2005-09-09 Thread Anton Altaparmakov
On Fri, 2005-09-09 at 15:53 +0100, Christoph Hellwig wrote: On Fri, Sep 09, 2005 at 07:51:23AM -0700, Roland Dreier wrote: Anton fs/ntfs/malloc.h::ntfs_malloc_nofs() to do the kmalloc() Anton based allocations with __GFP_HIGHMEM, analogous to how the Anton vmalloc() based

Re: [PATCH 2/25] NTFS: Allow highmem kmalloc() in ntfs_malloc_nofs() and add _nofail() version.

2005-09-09 Thread Horst von Brand
Anton Altaparmakov [EMAIL PROTECTED] wrote: On Fri, 2005-09-09 at 15:02 +0300, Pekka J Enberg wrote: On Fri, 9 Sep 2005, Anton Altaparmakov wrote: I completely disagree with you given that this is not inventing [...] own memory allocators, it is just a convenient short hand. I am