updated release.txt, rxr optimization (no file buffering, write to every page at memory allocation, fix to fifo depth

This commit is contained in:
maliakal_d 2020-03-10 10:59:30 +01:00
parent d112956f79
commit 93f8e8ecb3
6 changed files with 57 additions and 31 deletions

View File

@ -7,8 +7,8 @@ This document describes the differences between 4.2.0 and 4.1.1 releases.
CONTENTS CONTENTS
-------- --------
1. Topics Concerning 1. Topics Concerning
2. Resolved Issues 2. New Features
3. Known Issues 3. Resolved Issues
4. Firmware Requirements 4. Firmware Requirements
5. Download, Documentation & Support 5. Download, Documentation & Support
@ -17,41 +17,65 @@ This document describes the differences between 4.2.0 and 4.1.1 releases.
1. Topics Concerning 1. Topics Concerning
==================== ====================
- (Eiger) detector server startup with vcal = 0 to reduce noise - (Eiger) Change in vcal dac value
- Deactivate will deactivate a module even if FEB does not work. - (Eiger) Deactivate a module
- trimbits check - (Eiger) Setting all trimbits argument check
- zmqsocket - (Receiver) rx_fifodepth has a higher range
- fifo size (memory allocation print to mb) - (Receiver) subperiod in master file
- subexptime also sets subperiod in master fle - (Receiver) performance (memory allocation and alignment, file buffering)
- minor check if no detectors ()xxxxxxxxxxxxxxxxxxxxxxx - (Package) Removed warnings including memory overlap copy
- setflippeddatax in users xxxxx - (Users) Added setflippeddatax to users class
- memory alignment in receiver
Compared to 4.1.1,
- no firmware update required for this release
- eiger on-board detector server update required for this release
2. Resolved Issues 2. New Features
===============
Receiver
--------
1. Memory in receiver is now byte aligned and write to every page
at memory allocation to ensure complete memory allocated right
from start. Removed file buffering when writing to file. Replaced
pausing on keepRunning variable with semaphore to reduce cpu
load.
Client
------
1. Added setflippeddatax to users class.
3. Resolved Issues
================== ==================
Detector Server (Eiger) Detector Server (Eiger)
----------------------- -----------------------
1. Vcal dac set to 0 at on-board detector server start up to 1. Vcal dac set to 0 at on-board detector server start up to
reduce noise. reduce noise.
2. Deactivate will deactivate a module even if FEB does not work. 2. Setting activate to 0 sent to both control and stop server.
So, deactivate a module can be done even if FEB communication fails.
Restarting the server will activate the module again.
3. Trimbits values checked for values 0 - 63. 3. Setting all trimbits values checked for values 0 - 63.
Receiver Receiver
-------- --------
1. Earlier, setting rx_fifodepth to a high value would set to
a lower value, printing this low value to console,
but not giving an error. Memory allocated can now take in 64 bits.
2. Modifying subexptime now also updates subperiod in master file.
Also, the print for subperiod name to console is corrected.
1. zmq socket send memory not overlapping Package
2. fifo size not be large (and memory allocated print to mb) -------
1. Many warnings have been fixed, including those with overlapping
- subexptime also sets subperiod in master fle memory copies for source and destination.
3. Known Issues
===============

View File

@ -188,10 +188,9 @@ class BinaryFileStatic {
* @param fd file pointer * @param fd file pointer
* @param owenable overwrite enable * @param owenable overwrite enable
* @param fname complete file name * @param fname complete file name
* @param filebuffersize file buffer size
* @returns 0 for success and 1 for fail * @returns 0 for success and 1 for fail
*/ */
static int CreateDataFile(FILE*& fd, bool owenable, std::string fname, size_t filebuffersize) static int CreateDataFile(FILE*& fd, bool owenable, std::string fname)
{ {
if(!owenable){ if(!owenable){
if (NULL == (fd = fopen((const char *) fname.c_str(), "wx"))){ if (NULL == (fd = fopen((const char *) fname.c_str(), "wx"))){
@ -204,8 +203,8 @@ class BinaryFileStatic {
fd = 0; fd = 0;
return 1; return 1;
} }
//setting file buffer size to 16mb //setting to no file buffering
setvbuf(fd,NULL,_IOFBF,filebuffersize); setvbuf(fd,NULL, _IONBF, 0);
return 0; return 0;
} }

View File

@ -17,9 +17,6 @@
#define STATISTIC_FRAMENUMBER_INFINITE 20000 #define STATISTIC_FRAMENUMBER_INFINITE 20000
//binary
#define FILE_BUFFER_SIZE (16*1024*1024) //16mb
//fifo //fifo
#define FIFO_HEADER_NUMBYTES 8 #define FIFO_HEADER_NUMBYTES 8

View File

@ -49,7 +49,7 @@ int BinaryFile::CreateFile(uint64_t fnum) {
currentFileName = BinaryFileStatic::CreateFileName(filePath, fileNamePrefix, *fileIndex, currentFileName = BinaryFileStatic::CreateFileName(filePath, fileNamePrefix, *fileIndex,
(*numImages > 1), fnum, *detIndex, *numUnitsPerDetector, index); (*numImages > 1), fnum, *detIndex, *numUnitsPerDetector, index);
if (BinaryFileStatic::CreateDataFile(filefd, *overWriteEnable, currentFileName, FILE_BUFFER_SIZE) == FAIL) if (BinaryFileStatic::CreateDataFile(filefd, *overWriteEnable, currentFileName) == FAIL)
return FAIL; return FAIL;
if(!(*silentMode)) { if(!(*silentMode)) {

View File

@ -53,6 +53,10 @@ int Fifo::CreateFifos(uint32_t fifoItemSize) {
return FAIL; return FAIL;
} }
memset(memory, 0, mem_len); memset(memory, 0, mem_len);
int pagesize = getpagesize();
for (size_t i = 0; i < mem_len; i += pagesize) {
strcpy(memory + i, "memory");
}
FILE_LOG(logDEBUG) << "Memory Allocated " << index << ": " << (double)mem_len/(double)(1024 * 1024) << " MB"; FILE_LOG(logDEBUG) << "Memory Allocated " << index << ": " << (double)mem_len/(double)(1024 * 1024) << " MB";
{ //push free addresses into fifoFree fifo { //push free addresses into fifoFree fifo

View File

@ -836,7 +836,9 @@ int UDPStandardImplementation::SetupFifoStructure() {
if(dataStreamer.size())dataStreamer[i]->SetFifo(fifo[i]); if(dataStreamer.size())dataStreamer[i]->SetFifo(fifo[i]);
} }
FILE_LOG(logINFO) << "Memory Allocated Per Fifo: " << (double)( ((generalData->imageSize) * numberofJobs + (generalData->fifoBufferHeaderSize)) * fifoDepth)/ (double)(1024 * 1024) << " MB" ; FILE_LOG(logINFO) << "Memory Allocated Per Fifo: " << (double)( ((size_t)(generalData->imageSize) * numberofJobs +
(size_t)(generalData->fifoBufferHeaderSize)) * (size_t)fifoDepth)/
(double)(1024 * 1024) << " MB" ;
FILE_LOG(logINFO) << numThreads << " Fifo structure(s) reconstructed"; FILE_LOG(logINFO) << numThreads << " Fifo structure(s) reconstructed";
return OK; return OK;
} }