Skip to contentSkip to conversation

Posted Write onto a PCI end point device using Linux

DISCUSSION Sanka Piyaratna 2 participants 5 messages Dec 7, 2010 – Dec 8, 2010 1 message not in the archive

lore
Share & tools
lore
#0 lore raw

Hi,

I am wondering whether it is possible to issue a posted write using the host computer's root complex towards an PCI express end point. I have done this using

DMA in the past. However, if posted writes are possible that would save a lot of

time and effort and would be quicker too.

Thanks,
Sanka

#1 lore raw
Quoted 9 lines · Sanka Piyaratna

Hi,

I am wondering whether it is possible to issue a posted write using the host computer's root complex towards an PCI express end point. I have done this using

DMA in the past. However, if posted writes are possible that would save a lot of

time and effort and would be quicker too.

Writes from the CPU to PCI memory are always posted. However, the posted write buffer size is usually quite limited and so this probably will still cause CPU overhead when writing any significant amount of data this way.

#3 lore raw
In reply to a message not in the archive
Quoted 4 lines · Sanka Piyaratna

Hi Robert,
Could you please tell me how I can initiate a posted write towards a PCIe endpoint with larger than 32 bit payload using Linux?
Thanks and regards,

You can try writeq to get a 64-bit payload, but I don't think it's available on all platforms. In particular with a 32-bit CPU, it may not be possible at all. If you need to send bigger payloads then you need to use DMA.

Quoted 30 lines

Sanka Piyaratna

________________________________
From: Robert Hancock <[email protected]>
To: Sanka Piyaratna <[email protected]>
Cc: [email protected]
Sent: Wed, 8 December, 2010 12:16:54 PM
Subject: Re: Posted Write onto a PCI end point device using Linux

Quoted 8 lines · Sanka Piyaratna

Hi,

I am wondering whether it is possible to issue a posted write using the host
computer's root complex towards an PCI express end point. I have done this using

Quoted 4 lines

DMA in the past. However, if posted writes are possible that would save a lot of

time and effort and would be quicker too.

Writes from the CPU to PCI memory are always posted. However, the posted write buffer size is usually quite limited and so this probably will still cause CPU overhead when writing any significant amount of data this way.

#4 lore raw

Thanks for that Robert. When you say DMA, this has to be implemented at the endpoint device doesn't it? There is no DMA mode on the CPU for doing this is there?

Sanka Piyaratna

________________________________
From: Robert Hancock <[email protected]>
To: Sanka Piyaratna <[email protected]>
Cc: [email protected]
Sent: Wed, 8 December, 2010 3:25:47 PM
Subject: Re: Posted Write onto a PCI end point device using Linux

Quoted 4 lines · Sanka Piyaratna

Hi Robert,
Could you please tell me how I can initiate a posted write towards a PCIe endpoint with larger than 32 bit payload using Linux?
Thanks and regards,

You can try writeq to get a 64-bit payload, but I don't think it's available on all platforms. In particular with a 32-bit CPU, it may not be possible at all. If you need to send bigger payloads then you need to use DMA.

Quoted 30 lines

Sanka Piyaratna

________________________________
From: Robert Hancock <[email protected]>
To: Sanka Piyaratna <[email protected]>
Cc: [email protected]
Sent: Wed, 8 December, 2010 12:16:54 PM
Subject: Re: Posted Write onto a PCI end point device using Linux

Quoted 8 lines · Sanka Piyaratna

Hi,

I am wondering whether it is possible to issue a posted write using the host
computer's root complex towards an PCI express end point. I have done this using

Quoted 4 lines

DMA in the past. However, if posted writes are possible that would save a lot of

time and effort and would be quicker too.

Writes from the CPU to PCI memory are always posted. However, the posted write buffer size is usually quite limited and so this probably will still cause CPU overhead when writing any significant amount of data this way.

#5 lore raw
Quoted 3 lines · Sanka Piyaratna

Thanks for that Robert. When you say DMA, this has to be implemented at the endpoint device doesn't it? There is no DMA mode on the CPU for doing this is there?

No, there's not (on typical hardware, anyway).

Quoted 59 lines

 Sanka Piyaratna

________________________________
From: Robert Hancock <[email protected]>
To: Sanka Piyaratna <[email protected]>
Cc: [email protected]
Sent: Wed, 8 December, 2010 3:25:47 PM
Subject: Re: Posted Write onto a PCI end point device using Linux

Quoted 4 lines · Sanka Piyaratna

Hi Robert,
Could you please tell me how I can initiate a posted write towards a PCIe endpoint with larger than 32 bit payload using Linux?
Thanks and regards,

You can try writeq to get a 64-bit payload, but I don't think it's available on all platforms. In particular with a 32-bit CPU, it may not be possible at all. If you need to send bigger payloads then you need to use DMA.

Quoted 30 lines

Sanka Piyaratna

________________________________
From: Robert Hancock <[email protected]>
To: Sanka Piyaratna <[email protected]>
Cc: [email protected]
Sent: Wed, 8 December, 2010 12:16:54 PM
Subject: Re: Posted Write onto a PCI end point device using Linux

Quoted 8 lines · Sanka Piyaratna

Hi,

I am wondering whether it is possible to issue a posted write using the host
computer's root complex towards an PCI express end point. I have done this using

Quoted 4 lines

DMA in the past. However, if posted writes are possible that would save a lot of

time and effort and would be quicker too.

Writes from the CPU to PCI memory are always posted. However, the posted write buffer size is usually quite limited and so this probably will still cause CPU overhead when writing any significant amount of data this way.