Hi,

currently there's a problem with storage. The vm may use it to page out
dirty pages in order to free memory. Unfortunately this operation needs memory
itself. The included patch should help the problem by retrying a failed memory 
allocation
in ohci from the atomic pool. In the long run we need a mem_pool to be passable
to the lower level. Comments?

        Regards
                Oliver

You can import this changeset into BK by piping this whole message to:
'| bk receive [path to repository]' or apply the patch as usual.

===================================================================


[EMAIL PROTECTED], 2002-07-18 23:51:45+02:00, [EMAIL PROTECTED]
  - reduce chance of storage deadlock




diff -Nru a/drivers/usb/host/ohci-hcd.c b/drivers/usb/host/ohci-hcd.c
--- a/drivers/usb/host/ohci-hcd.c       Thu Jul 18 23:52:41 2002
+++ b/drivers/usb/host/ohci-hcd.c       Thu Jul 18 23:52:41 2002
@@ -187,13 +187,17 @@
        /* allocate the private part of the URB */
        urb_priv = kmalloc (sizeof (urb_priv_t) + size * sizeof (struct td *),
                        mem_flags);
+
+       if (!urb_priv && mem_flags == GFP_NOIO)
+               urb_priv = kmalloc (sizeof (urb_priv_t) + size * sizeof (struct td *),
+                       GFP_ATOMIC); /* Retry from the atomic pool in case we are on 
+the swap path */
        if (!urb_priv)
                return -ENOMEM;
        memset (urb_priv, 0, sizeof (urb_priv_t) + size * sizeof (struct td *));
-       
+
        /* fill the private part of the URB */
        urb_priv->length = size;
-       urb_priv->ed = ed;      
+       urb_priv->ed = ed;
 
        /* allocate the TDs (updating hash chains) */
        spin_lock_irqsave (&ohci->lock, flags);
@@ -205,7 +209,7 @@
                        spin_unlock_irqrestore (&ohci->lock, flags);
                        return -ENOMEM;
                }
-       }       
+       }
 
 // FIXME:  much of this switch should be generic, move to hcd code ...
 // ... and what's not generic can't really be handled this way.
@@ -216,7 +220,7 @@
         */
        switch (usb_pipetype (pipe)) {
                case PIPE_ISOCHRONOUS:
-                       if (urb->transfer_flags & USB_ISO_ASAP) { 
+                       if (urb->transfer_flags & USB_ISO_ASAP) {
                                urb->start_frame = ( (ed->state == ED_OPER)
                                        ? (ed->intriso.last_iso + 1)
                                        : (le16_to_cpu (ohci->hcca->frame_no)

===================================================================


This BitKeeper patch contains the following changesets:
1.675
## Wrapped with gzip_uu ##


begin 664 bkpatch19598
M'XL(`*HX-ST``[54:V^;,!3]C'_%G2I533J";3"05*F2MEL7[9$H6;]5BGB8
M@`(XLF%9M^R_SR1KNK93U;T0TL7W89][[C$'<*6X[!DBSSYQB0[@C5"57O)2
ME+R3BH+G65E_[@BYT,&I$#IH-6YK5V&%2[.2G"MK31G2*9.@BE+0$=4S2,?>
M>ZJ;%>\9TU>75^^&4X3Z?3A/@W+!9[R"?A^%RT%<\[RSE")(F],V^_"&8DP(
MH0S;S"5L0WW;=C;$Q6&L/V/J=9/0[:*%Y(O!KCP2Q?URBCWB$=?Q*-LPRCP7
M70#IN!X#3"WL6<0':O<8Z3GL&-,>QK#K;O`K'N"8@(G1&?P]YG,4@0F2QW7$
M(=+%VH@$5"5DL.`0\R#.1;1$;X'978^@R1UIR/S-!R$<8'0*JV8<@YBKY4_`
M8]FTJZQ:A58:Q99(H\S4'YUH1Q^A%#.'.?9&<^CBC4-BU_9#YCHAB8@=/L77
M_<VUO![M[A&?$J;/V-C89^Y6'4\4-7KY+UT\U-`S@#>JHEB/EA%B;U5EVP]%
M1>ES1.6#Z?Q#4=6*0Y5R""I19!&LA,@AT]*JPR)3*A-E([1@+[5:AKH,(`FR
M7(%&`)6`7*RAX(60-UJ!N]&,P93K[:L5-7EJ2G\@T!'QN^"@:V1HI$<O-*;Y
M2A\`AX<-C'F2!PNEAP^7KR?S#^/1N(4,8Y_4AV41Y/JZP)'*OG#=W=%M;%ZU
MX!@:+[3A-J@J64<55#&T6R_U1D:SZ_#C^/WHO'4"5ANFO)(WD$A1/":RA"C0
M!*^U6^HK6VXSU#I8-=<KA;:%+DC7!J);VIKK9NWNUHW9PS9/>:RA\_@$75#L
M-QD[8WS3#M+=.K9&(\QV/9FGE0Q*E7#Y@Y)#N)J=S4>S\7PX&TY:\/7N1QRE
5/%JJNNC;L1=V$YJ@[Y$NDZ;R!0``
`
end



-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to