Re: [PATCH] Don't use unnecessary GFP_ATOMIC in sg.c v2

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> Oh no, not again. This isn't the first time kernel folks
> have tried to demote the sg driver's GFP_ATOMIC to GFP_KERNEL.

That is because it is abusing GFP_ATOMIC.

> In the past it has ended in grief. The driver was written
> to attempt _fast_ allocation and if that failed then:

You want it to not swap?  Then __GFP_NOIO would be correct.

>   - lessen the requested allocation (e.g. smaller elements
>     but more of them in a scatter gather list), or

What is when the allocation is already 1 page? 

>   - report the error back to the user (i.e. ENOMEM) assuming
>     that they are knowledgeable enough to do something about it
>     (e.g. do two smaller READs rather than one larger one).

But the kernel can actually do something about it, just not
when you pass it __GFP_ATOMIC.

-Andi

-
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]
  Powered by Linux