Re: can a kmalloc be both GFP_ATOMIC and GFP_KERNEL at the same time?

2007-04-30 Thread Stefan Richter
Satyam Sharma wrote: > On 4/30/07, Alan Cox <[EMAIL PROTECTED]> wrote: >> i2o/device.c should be GFP_KERNEL as far as I can tell. It was meant to >> be that way and the callers appear to all be calling it in sleep capable >> contexts. >> >> aic7xxx_old.c should probably be GFP_KERNEL as

Re: can a kmalloc be both GFP_ATOMIC and GFP_KERNEL at the same time?

2007-04-30 Thread Satyam Sharma
On 4/30/07, Alan Cox <[EMAIL PROTECTED]> wrote: i2o/device.c should be GFP_KERNEL as far as I can tell. It was meant to be that way and the callers appear to all be calling it in sleep capable contexts. aic7xxx_old.c should probably be GFP_KERNEL as ->slave_alloc methods appear to be able to

Re: can a kmalloc be both GFP_ATOMIC and GFP_KERNEL at the same time?

2007-04-30 Thread Alan Cox
> > > > drivers/scsi/aic7xxx_old.c: aic_dev = kmalloc(sizeof(struct > > > > aic_dev_data), GFP_ATOMIC | GFP_KERNEL); > > > > drivers/message/i2o/device.c: resblk = kmalloc(buflen + 8, GFP_KERNEL > > > > | GFP_ATOMIC); > > > > > > > > clarification? > > > > > > GFP_ATOMIC implies that the

Re: can a kmalloc be both GFP_ATOMIC and GFP_KERNEL at the same time?

2007-04-30 Thread Andrew Morton
On Mon, 30 Apr 2007 04:46:54 -0400 (EDT) "Robert P. J. Day" <[EMAIL PROTECTED]> wrote: > On Mon, 30 Apr 2007, Andrew Morton wrote: > > > On Sat, 28 Apr 2007 09:40:39 -0400 (EDT) "Robert P. J. Day" <[EMAIL > > PROTECTED]> wrote: > > > > > > > > i'd always assumed that the type flags of

Re: can a kmalloc be both GFP_ATOMIC and GFP_KERNEL at the same time?

2007-04-30 Thread Satyam Sharma
On 4/30/07, Robert P. J. Day <[EMAIL PROTECTED]> wrote: On Mon, 30 Apr 2007, Jan Engelhardt wrote: > > >> > drivers/scsi/aic7xxx_old.c: aic_dev = kmalloc(sizeof(struct aic_dev_data), GFP_ATOMIC | GFP_KERNEL); > >> > drivers/message/i2o/device.c: resblk = kmalloc(buflen + 8, GFP_KERNEL |

Re: can a kmalloc be both GFP_ATOMIC and GFP_KERNEL at the same time?

2007-04-30 Thread Robert P. J. Day
On Mon, 30 Apr 2007, Jan Engelhardt wrote: > > On Apr 30 2007 04:46, Robert P. J. Day wrote: > >> > > >> > i'd always assumed that the type flags of GFP_ATOMIC and GFP_KERNEL > >> > were mutually exclusive when it came to calling kmalloc(), at least > >> > based on everything i'd read. so i'm

Re: can a kmalloc be both GFP_ATOMIC and GFP_KERNEL at the same time?

2007-04-30 Thread Jan Engelhardt
On Apr 30 2007 04:46, Robert P. J. Day wrote: >> > >> > i'd always assumed that the type flags of GFP_ATOMIC and GFP_KERNEL >> > were mutually exclusive when it came to calling kmalloc(), at least >> > based on everything i'd read. so i'm not sure how to interpret the >> > following: >> > >> >

Re: can a kmalloc be both GFP_ATOMIC and GFP_KERNEL at the same time?

2007-04-30 Thread Robert P. J. Day
On Mon, 30 Apr 2007, Andrew Morton wrote: > On Sat, 28 Apr 2007 09:40:39 -0400 (EDT) "Robert P. J. Day" <[EMAIL > PROTECTED]> wrote: > > > > > i'd always assumed that the type flags of GFP_ATOMIC and GFP_KERNEL > > were mutually exclusive when it came to calling kmalloc(), at least > > based

Re: can a kmalloc be both GFP_ATOMIC and GFP_KERNEL at the same time?

2007-04-30 Thread Andrew Morton
On Sat, 28 Apr 2007 09:40:39 -0400 (EDT) "Robert P. J. Day" <[EMAIL PROTECTED]> wrote: > > i'd always assumed that the type flags of GFP_ATOMIC and GFP_KERNEL > were mutually exclusive when it came to calling kmalloc(), at least > based on everything i'd read. so i'm not sure how to

Re: can a kmalloc be both GFP_ATOMIC and GFP_KERNEL at the same time?

2007-04-30 Thread Christoph Lameter
On Sat, 28 Apr 2007, Alan Cox wrote: > > > drivers/scsi/aic7xxx_old.c: aic_dev = kmalloc(sizeof(struct > > > aic_dev_data), GFP_ATOMIC | GFP_KERNEL); > > > drivers/message/i2o/device.c: resblk = kmalloc(buflen + 8, GFP_KERNEL | > > > GFP_ATOMIC); > > > > > > clarification? > > > > oh, i'm

Re: can a kmalloc be both GFP_ATOMIC and GFP_KERNEL at the same time?

2007-04-30 Thread Christoph Lameter
On Sat, 28 Apr 2007, Alan Cox wrote: drivers/scsi/aic7xxx_old.c: aic_dev = kmalloc(sizeof(struct aic_dev_data), GFP_ATOMIC | GFP_KERNEL); drivers/message/i2o/device.c: resblk = kmalloc(buflen + 8, GFP_KERNEL | GFP_ATOMIC); clarification? oh, i'm *aware* of the

Re: can a kmalloc be both GFP_ATOMIC and GFP_KERNEL at the same time?

2007-04-30 Thread Andrew Morton
On Sat, 28 Apr 2007 09:40:39 -0400 (EDT) Robert P. J. Day [EMAIL PROTECTED] wrote: i'd always assumed that the type flags of GFP_ATOMIC and GFP_KERNEL were mutually exclusive when it came to calling kmalloc(), at least based on everything i'd read. so i'm not sure how to interpret the

Re: can a kmalloc be both GFP_ATOMIC and GFP_KERNEL at the same time?

2007-04-30 Thread Robert P. J. Day
On Mon, 30 Apr 2007, Andrew Morton wrote: On Sat, 28 Apr 2007 09:40:39 -0400 (EDT) Robert P. J. Day [EMAIL PROTECTED] wrote: i'd always assumed that the type flags of GFP_ATOMIC and GFP_KERNEL were mutually exclusive when it came to calling kmalloc(), at least based on everything

Re: can a kmalloc be both GFP_ATOMIC and GFP_KERNEL at the same time?

2007-04-30 Thread Jan Engelhardt
On Apr 30 2007 04:46, Robert P. J. Day wrote: i'd always assumed that the type flags of GFP_ATOMIC and GFP_KERNEL were mutually exclusive when it came to calling kmalloc(), at least based on everything i'd read. so i'm not sure how to interpret the following:

Re: can a kmalloc be both GFP_ATOMIC and GFP_KERNEL at the same time?

2007-04-30 Thread Robert P. J. Day
On Mon, 30 Apr 2007, Jan Engelhardt wrote: On Apr 30 2007 04:46, Robert P. J. Day wrote: i'd always assumed that the type flags of GFP_ATOMIC and GFP_KERNEL were mutually exclusive when it came to calling kmalloc(), at least based on everything i'd read. so i'm not sure how to

Re: can a kmalloc be both GFP_ATOMIC and GFP_KERNEL at the same time?

2007-04-30 Thread Satyam Sharma
On 4/30/07, Robert P. J. Day [EMAIL PROTECTED] wrote: On Mon, 30 Apr 2007, Jan Engelhardt wrote: drivers/scsi/aic7xxx_old.c: aic_dev = kmalloc(sizeof(struct aic_dev_data), GFP_ATOMIC | GFP_KERNEL); drivers/message/i2o/device.c: resblk = kmalloc(buflen + 8, GFP_KERNEL | GFP_ATOMIC);

Re: can a kmalloc be both GFP_ATOMIC and GFP_KERNEL at the same time?

2007-04-30 Thread Andrew Morton
On Mon, 30 Apr 2007 04:46:54 -0400 (EDT) Robert P. J. Day [EMAIL PROTECTED] wrote: On Mon, 30 Apr 2007, Andrew Morton wrote: On Sat, 28 Apr 2007 09:40:39 -0400 (EDT) Robert P. J. Day [EMAIL PROTECTED] wrote: i'd always assumed that the type flags of GFP_ATOMIC and GFP_KERNEL

Re: can a kmalloc be both GFP_ATOMIC and GFP_KERNEL at the same time?

2007-04-30 Thread Alan Cox
drivers/scsi/aic7xxx_old.c: aic_dev = kmalloc(sizeof(struct aic_dev_data), GFP_ATOMIC | GFP_KERNEL); drivers/message/i2o/device.c: resblk = kmalloc(buflen + 8, GFP_KERNEL | GFP_ATOMIC); clarification? GFP_ATOMIC implies that the memory comes from the zones

Re: can a kmalloc be both GFP_ATOMIC and GFP_KERNEL at the same time?

2007-04-30 Thread Satyam Sharma
On 4/30/07, Alan Cox [EMAIL PROTECTED] wrote: i2o/device.c should be GFP_KERNEL as far as I can tell. It was meant to be that way and the callers appear to all be calling it in sleep capable contexts. aic7xxx_old.c should probably be GFP_KERNEL as -slave_alloc methods appear to be able to sleep

Re: can a kmalloc be both GFP_ATOMIC and GFP_KERNEL at the same time?

2007-04-30 Thread Stefan Richter
Satyam Sharma wrote: On 4/30/07, Alan Cox [EMAIL PROTECTED] wrote: i2o/device.c should be GFP_KERNEL as far as I can tell. It was meant to be that way and the callers appear to all be calling it in sleep capable contexts. aic7xxx_old.c should probably be GFP_KERNEL as -slave_alloc methods

Re: can a kmalloc be both GFP_ATOMIC and GFP_KERNEL at the same time?

2007-04-28 Thread Alan Cox
> > drivers/scsi/aic7xxx_old.c: aic_dev = kmalloc(sizeof(struct aic_dev_data), > > GFP_ATOMIC | GFP_KERNEL); > > drivers/message/i2o/device.c: resblk = kmalloc(buflen + 8, GFP_KERNEL | > > GFP_ATOMIC); > > > > clarification? > > oh, i'm *aware* of the definitions of those flags, but every

Re: can a kmalloc be both GFP_ATOMIC and GFP_KERNEL at the same time?

2007-04-28 Thread WANG Cong
On Sat, Apr 28, 2007 at 08:03:42AM -0700, Arjan van de Ven wrote: > >> > >> > >> > i'd always assumed that the type flags of GFP_ATOMIC and GFP_KERNEL >> > were mutually exclusive when it came to calling kmalloc(), at least >> > based on everything i'd read. so i'm not sure how to interpret the

RE: can a kmalloc be both GFP_ATOMIC and GFP_KERNEL at the same time?

2007-04-28 Thread Arjan van de Ven
> > > > > > i'd always assumed that the type flags of GFP_ATOMIC and GFP_KERNEL > > were mutually exclusive when it came to calling kmalloc(), at least > > based on everything i'd read. so i'm not sure how to interpret the > > following: > > > > drivers/scsi/aic7xxx_old.c: aic_dev =

RE: can a kmalloc be both GFP_ATOMIC and GFP_KERNEL at the same time?

2007-04-28 Thread Robert P. J. Day
On Sat, 28 Apr 2007, Shan, Guo Wen (Gavin) wrote: > > #define GFP_ATOMIC (__GFP_HIGH) > #define GFP_NOIO(__GFP_WAIT) > #define GFP_NOFS(__GFP_WAIT | __GFP_IO) > #define GFP_KERNEL (__GFP_WAIT | __GFP_IO | __GFP_FS) > > -Original Message- > From: Robert P. J. Day

RE: can a kmalloc be both GFP_ATOMIC and GFP_KERNEL at the same time?

2007-04-28 Thread Shan, Guo Wen (Gavin)
#define GFP_ATOMIC (__GFP_HIGH) #define GFP_NOIO(__GFP_WAIT) #define GFP_NOFS(__GFP_WAIT | __GFP_IO) #define GFP_KERNEL (__GFP_WAIT | __GFP_IO | __GFP_FS) -Original Message- From: Robert P. J. Day [mailto:[EMAIL PROTECTED] Sent: Saturday, April 28, 2007 9:41 PM

can a kmalloc be both GFP_ATOMIC and GFP_KERNEL at the same time?

2007-04-28 Thread Robert P. J. Day
i'd always assumed that the type flags of GFP_ATOMIC and GFP_KERNEL were mutually exclusive when it came to calling kmalloc(), at least based on everything i'd read. so i'm not sure how to interpret the following: drivers/scsi/aic7xxx_old.c: aic_dev = kmalloc(sizeof(struct aic_dev_data),

can a kmalloc be both GFP_ATOMIC and GFP_KERNEL at the same time?

2007-04-28 Thread Robert P. J. Day
i'd always assumed that the type flags of GFP_ATOMIC and GFP_KERNEL were mutually exclusive when it came to calling kmalloc(), at least based on everything i'd read. so i'm not sure how to interpret the following: drivers/scsi/aic7xxx_old.c: aic_dev = kmalloc(sizeof(struct aic_dev_data),

RE: can a kmalloc be both GFP_ATOMIC and GFP_KERNEL at the same time?

2007-04-28 Thread Shan, Guo Wen (Gavin)
#define GFP_ATOMIC (__GFP_HIGH) #define GFP_NOIO(__GFP_WAIT) #define GFP_NOFS(__GFP_WAIT | __GFP_IO) #define GFP_KERNEL (__GFP_WAIT | __GFP_IO | __GFP_FS) -Original Message- From: Robert P. J. Day [mailto:[EMAIL PROTECTED] Sent: Saturday, April 28, 2007 9:41 PM

RE: can a kmalloc be both GFP_ATOMIC and GFP_KERNEL at the same time?

2007-04-28 Thread Robert P. J. Day
On Sat, 28 Apr 2007, Shan, Guo Wen (Gavin) wrote: #define GFP_ATOMIC (__GFP_HIGH) #define GFP_NOIO(__GFP_WAIT) #define GFP_NOFS(__GFP_WAIT | __GFP_IO) #define GFP_KERNEL (__GFP_WAIT | __GFP_IO | __GFP_FS) -Original Message- From: Robert P. J. Day

RE: can a kmalloc be both GFP_ATOMIC and GFP_KERNEL at the same time?

2007-04-28 Thread Arjan van de Ven
i'd always assumed that the type flags of GFP_ATOMIC and GFP_KERNEL were mutually exclusive when it came to calling kmalloc(), at least based on everything i'd read. so i'm not sure how to interpret the following: drivers/scsi/aic7xxx_old.c: aic_dev = kmalloc(sizeof(struct

Re: can a kmalloc be both GFP_ATOMIC and GFP_KERNEL at the same time?

2007-04-28 Thread WANG Cong
On Sat, Apr 28, 2007 at 08:03:42AM -0700, Arjan van de Ven wrote: i'd always assumed that the type flags of GFP_ATOMIC and GFP_KERNEL were mutually exclusive when it came to calling kmalloc(), at least based on everything i'd read. so i'm not sure how to interpret the following:

Re: can a kmalloc be both GFP_ATOMIC and GFP_KERNEL at the same time?

2007-04-28 Thread Alan Cox
drivers/scsi/aic7xxx_old.c: aic_dev = kmalloc(sizeof(struct aic_dev_data), GFP_ATOMIC | GFP_KERNEL); drivers/message/i2o/device.c: resblk = kmalloc(buflen + 8, GFP_KERNEL | GFP_ATOMIC); clarification? oh, i'm *aware* of the definitions of those flags, but every single source