mirror of
https://github.com/SCST-project/scst.git
synced 2026-05-20 20:21:30 +00:00
- Data digest SMP scalability imcreased
- Iscsi_dump_char() made thread safe git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@841 d57e44dd-8a1f-0410-8b47-8ef2f437770f
This commit is contained in:
@@ -482,10 +482,9 @@ const struct file_operations ctr_fops = {
|
||||
};
|
||||
|
||||
#ifdef CONFIG_SCST_DEBUG
|
||||
static void iscsi_dump_char(int ch)
|
||||
static void iscsi_dump_char(int ch, unsigned char *text, int *pos)
|
||||
{
|
||||
static unsigned char text[16];
|
||||
static int i;
|
||||
int i = *pos;
|
||||
|
||||
if (ch < 0) {
|
||||
while ((i % 16) != 0) {
|
||||
@@ -498,7 +497,7 @@ static void iscsi_dump_char(int ch)
|
||||
printk(KERN_CONT " |");
|
||||
}
|
||||
i = 0;
|
||||
return;
|
||||
goto out;
|
||||
}
|
||||
|
||||
text[i] = (ch < 0x20 || (ch >= 0x80 && ch <= 0xa0)) ? ' ' : ch;
|
||||
@@ -509,10 +508,17 @@ static void iscsi_dump_char(int ch)
|
||||
i = 0;
|
||||
} else if ((i % 4) == 0)
|
||||
printk(KERN_CONT " |");
|
||||
|
||||
out:
|
||||
*pos = i;
|
||||
return;
|
||||
}
|
||||
|
||||
void iscsi_dump_pdu(struct iscsi_pdu *pdu)
|
||||
{
|
||||
unsigned char text[16];
|
||||
int pos = 0;
|
||||
|
||||
if (trace_flag & TRACE_D_DUMP_PDU) {
|
||||
unsigned char *buf;
|
||||
int i;
|
||||
@@ -520,14 +526,14 @@ void iscsi_dump_pdu(struct iscsi_pdu *pdu)
|
||||
buf = (void *)&pdu->bhs;
|
||||
printk(KERN_DEBUG "BHS: (%p,%zd)\n", buf, sizeof(pdu->bhs));
|
||||
for (i = 0; i < sizeof(pdu->bhs); i++)
|
||||
iscsi_dump_char(*buf++);
|
||||
iscsi_dump_char(-1);
|
||||
iscsi_dump_char(*buf++, text, &pos);
|
||||
iscsi_dump_char(-1, text, &pos);
|
||||
|
||||
buf = (void *)pdu->ahs;
|
||||
printk(KERN_DEBUG "AHS: (%p,%d)\n", buf, pdu->ahssize);
|
||||
for (i = 0; i < pdu->ahssize; i++)
|
||||
iscsi_dump_char(*buf++);
|
||||
iscsi_dump_char(-1);
|
||||
iscsi_dump_char(*buf++, text, &pos);
|
||||
iscsi_dump_char(-1, text, &pos);
|
||||
|
||||
printk(KERN_DEBUG "Data: (%d)\n", pdu->datasize);
|
||||
}
|
||||
|
||||
@@ -824,8 +824,12 @@ static int recv(struct iscsi_conn *conn)
|
||||
break;
|
||||
case RX_CHECK_DDIGEST:
|
||||
conn->read_state = RX_END;
|
||||
if (cmnd->pdu.datasize <= 256*1024) {
|
||||
/* It's cache hot, so let's compute it inline */
|
||||
if (cmnd->pdu.datasize <= 16*1024) {
|
||||
/*
|
||||
* It's cache hot, so let's compute it inline. The
|
||||
* choice here about what will expose more latency:
|
||||
* possible cache misses or the digest calculation.
|
||||
*/
|
||||
TRACE_DBG("cmnd %p, opcode %x: checking RX "
|
||||
"ddigest inline", cmnd, cmnd_opcode(cmnd));
|
||||
cmnd->ddigest_checked = 1;
|
||||
|
||||
Reference in New Issue
Block a user