Hello Problem statement.
I am using a USRP E310 device and I am developing an application performing acquisition and writing data to a high speed external USB pen drive. The problem is inability to sustain rx data stream (overflow occurs). The question is whether it is available a API enabling to submit multiple rx buffers to recv in a queue, permitting to the recv to continue receiving data while main process is handling other stuff. As an example I used, in other projects handling multimedia audio / video high data rates, v4l2 (video for linux ); the v4l2 api permits to enqueuer buffers to be written, and to retrieve filled buffers. Detailed setup description The application is using 2 threads. The main thread is reading (https://files.ettus.com/manual/classuhd_1_1rx__streamer.html#af4e581b97d92553c6091108393a7da1b) 2 channels of data at 1.92MSamples/s (K * 1016 samples per buffer at 4 bytes per sample - short complex) and store data in a memory buffer. The second thread uses async io API (http://man7.org/linux/man-pages/man3/aio_write.3.html) to write to USB drive. Main thread is running RR scheduling policy at max (99) priority. Second thread is running RR scheduling policy at min (1) priority. USB pen drive is capable of 64MB/s sustained. Memory buffer is big enough (100136960 bytes = 12320 sample buffer dimension per channel = more than 6 seconds per channel) to prevent overflow between data written into and data reading. I tried different values for K and an present I running with K= 20 (recv call rate is around 10ms) . The problem is that randomly the main thread does not call recv at the expected rate. The CPU hangs up, probably for kernel level tasks relevant to USB writing. The behavior is that recv call period is normally 10ms and suddenly happens to be 100ms. This produces overflow at library level. Thanks Andrea Varesio ....... ------------------------------------------------------------------ TIM S.p.A. Direzione e coordinamento Vivendi SA Andrea Varesio T.I.MF.WNA Video Senior Engineer, PMP, PSM Via G.Reiss Romoli 274, 10148 Turin - Italy +39 011 2286197<tel:%2B39%20011%C2%A02286197> +39 335 7669724<tel:%2B39%20335%207669724> Fax 0691865442 Questo messaggio e i suoi allegati sono indirizzati esclusivamente alle persone indicate. La diffusione, copia o qualsiasi altra azione derivante dalla conoscenza di queste informazioni sono rigorosamente vietate. Qualora abbiate ricevuto questo documento per errore siete cortesemente pregati di darne immediata comunicazione al mittente e di provvedere alla sua distruzione, Grazie. This e-mail and any attachments is confidential and may contain privileged information intended for the addressee(s) only. Dissemination, copying, printing or use by anybody else is unauthorised. If you are not the intended recipient, please delete this message and any attachments and advise the sender by return e-mail, Thanks. Rispetta l'ambiente. Non stampare questa mail se non รจ necessario.
_______________________________________________ USRP-users mailing list USRP-users@lists.ettus.com http://lists.ettus.com/mailman/listinfo/usrp-users_lists.ettus.com