* question about splice
@ 2013-07-26 7:08 ` majianpeng
0 siblings, 0 replies; 6+ messages in thread
From: majianpeng @ 2013-07-26 7:08 UTC (permalink / raw)
To: viro; +Cc: linux-fsdevel, linux-kernel
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset="gb2312", Size: 655 bytes --]
Hi all,
I used splice and found a prolem(at least i call).
The demo is:
A:splice(regularfileA--->pipe);
B:splice(pipe--->regularfileB)
Before do B, we modify the data of regA which now in pipe. The data to regularfileB willbe change.
If we used the buff
A:read(regA, buff);
B: write(buff, regB);
After A, the contend of regA can't effect the buff.
Review the code of splice,I know the pipe share the pagecache of regA.
Maybe this is not a problem or am i missing something?
Thanks!
Jianpeng Maÿôèº{.nÇ+·®+%Ëÿ±éݶ\x17¥wÿº{.nÇ+·¥{±þG«éÿ{ayº\x1dÊÚë,j\a¢f£¢·hïêÿêçz_è®\x03(éÝ¢j"ú\x1a¶^[m§ÿÿ¾\a«þG«éÿ¢¸?¨èÚ&£ø§~á¶iOæ¬z·vØ^\x14\x04\x1a¶^[m§ÿÿÃ\fÿ¶ìÿ¢¸?I¥
^ permalink raw reply [flat|nested] 6+ messages in thread
* question about splice
@ 2013-07-26 7:08 ` majianpeng
0 siblings, 0 replies; 6+ messages in thread
From: majianpeng @ 2013-07-26 7:08 UTC (permalink / raw)
To: viro; +Cc: linux-fsdevel, linux-kernel
Hi all,
I used splice and found a prolem(at least i call).
The demo is:
A:splice(regularfileA--->pipe);
B:splice(pipe--->regularfileB)
Before do B, we modify the data of regA which now in pipe. The data to regularfileB willbe change.
If we used the buff
A:read(regA, buff);
B: write(buff, regB);
After A, the contend of regA can't effect the buff.
Review the code of splice,I know the pipe share the pagecache of regA.
Maybe this is not a problem or am i missing something?
Thanks!
Jianpeng Ma
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: question about splice
2013-07-26 7:08 ` majianpeng
@ 2013-07-26 7:17 ` Gu Zheng
-1 siblings, 0 replies; 6+ messages in thread
From: Gu Zheng @ 2013-07-26 7:17 UTC (permalink / raw)
To: majianpeng; +Cc: viro, linux-fsdevel, linux-kernel
Hi Jianpeng,
On 07/26/2013 03:08 PM, majianpeng wrote:
> Hi all,
> I used splice and found a prolem(at least i call).
> The demo is:
> A:splice(regularfileA--->pipe);
> B:splice(pipe--->regularfileB)
> Before do B, we modify the data of regA which now in pipe. The data to regularfileB willbe change.
> If we used the buff
> A:read(regA, buff);
> B: write(buff, regB);
> After A, the contend of regA can't effect the buff.
> Review the code of splice,I know the pipe share the pagecache of regA.
Right. And also this is the splice's original design intention, using share mmap rather
than copy_to_user/copy_from_user in order to achieve zero-copy.
Thanks,
Gu
> Maybe this is not a problem or am i missing something?
>
> Thanks!
> Jianpeng MaN嫥叉靣笡y氊b瞂千v豝�)藓{.n�+壏{睉赙zXФ\x17洝塄}财爖�&j:+v墾�\a珣赙zZ+€�+zf"穐殘啳嗃i�z�\x1e畐ア�?櫒璀�&�)撷^[f旟^j谦y呩@A玜囤\x7f�\f0鹅h�\x0f鍜i\x7f
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: question about splice
@ 2013-07-26 7:17 ` Gu Zheng
0 siblings, 0 replies; 6+ messages in thread
From: Gu Zheng @ 2013-07-26 7:17 UTC (permalink / raw)
To: majianpeng; +Cc: viro, linux-fsdevel, linux-kernel
Hi Jianpeng,
On 07/26/2013 03:08 PM, majianpeng wrote:
> Hi all,
> I used splice and found a prolem(at least i call).
> The demo is:
> A:splice(regularfileA--->pipe);
> B:splice(pipe--->regularfileB)
> Before do B, we modify the data of regA which now in pipe. The data to regularfileB willbe change.
> If we used the buff
> A:read(regA, buff);
> B: write(buff, regB);
> After A, the contend of regA can't effect the buff.
> Review the code of splice,I know the pipe share the pagecache of regA.
Right. And also this is the splice's original design intention, using share mmap rather
than copy_to_user/copy_from_user in order to achieve zero-copy.
Thanks,
Gu
> Maybe this is not a problem or am i missing something?
>
> Thanks!
> Jianpeng MaN嫥叉靣笡y氊b瞂千v豝�)藓{.n�+壏{睉赙zXФ\x17洝塄}财爖�&j:+v墾�\a珣赙zZ+€�+zf"穐殘啳嗃i�z�\x1e畐ア�?櫒璀�&�)撷^[f旟^j谦y呩@A玜囤\x7f�\f0鹅h�\x0f鍜i\x7f
--
To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Re: question about splice
2013-07-26 7:17 ` Gu Zheng
@ 2013-07-26 7:53 ` majianpeng
-1 siblings, 0 replies; 6+ messages in thread
From: majianpeng @ 2013-07-26 7:53 UTC (permalink / raw)
To: Gu Zheng; +Cc: Al Viro, linux-fsdevel, linux-kernel
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset="gb2312", Size: 2104 bytes --]
>Hi Jianpeng,
>
>On 07/26/2013 03:08 PM, majianpeng wrote:
>
>> Hi all,
>> I used splice and found a prolem(at least i call).
>> The demo is:
>> A:splice(regularfileA--->pipe);
>> B:splice(pipe--->regularfileB)
>> Before do B, we modify the data of regA which now in pipe. The data to regularfileB willbe change.
>> If we used the buff
>> A:read(regA, buff);
>> B: write(buff, regB);
>> After A, the contend of regA can't effect the buff.
>> Review the code of splice,I know the pipe share the pagecache of regA.
>
>Right. And also this is the splice's original design intention, using share mmap rather
>than copy_to_user/copy_from_user in order to achieve zero-copy.
>
If it use some method like COW, i think it can avoid this problem.
>Thanks,
>Gu
>
>> Maybe this is not a problem or am i missing something?
>
>>
>> Thanks!
>> Jianpeng MaN§²æìr¸yúèØb²X¬¶Ç§vØ^?)Þº{.n?+·¥{±êçzX§¶\x17¡Ü¨}©²Æ z?&j:+v¨?\a«êçzZ+?+zf£¢·h§~Ûi?ûàz?\x1e®w¥¢??¨è?&?)ߢ^[fù^jÇ«y§m
á@A«a¶Ú\x7f?
>0¶ìh?\x0fåi\x7f
>
>
Thanks!
Jianpeng Ma
>Hi Jianpeng,
>
>On 07/26/2013 03:08 PM, majianpeng wrote:
>
>> Hi all,
>> I used splice and found a prolem(at least i call).
>> The demo is:
>> A:splice(regularfileA--->pipe);
>> B:splice(pipe--->regularfileB)
>> Before do B, we modify the data of regA which now in pipe. The data to regularfileB willbe change.
>> If we used the buff
>> A:read(regA, buff);
>> B: write(buff, regB);
>> After A, the contend of regA can't effect the buff.
>> Review the code of splice,I know the pipe share the pagecache of regA.
>
>Right. And also this is the splice's original design intention, using share mmap rather
>than copy_to_user/copy_from_user in order to achieve zero-copy.
>
>Thanks,
>Gu
>
>> Maybe this is not a problem or am i missing something?
>
>>
>> Thanks!
>> Jianpeng MaN§²æìr¸yúèØb²X¬¶Ç§vØ^?)Þº{.n?+·¥{±êçzX§¶\x17¡Ü¨}©²Æ z?&j:+v¨?\a«êçzZ+?+zf£¢·h§~Ûi?ûàz?\x1e®w¥¢??¨è?&?)ߢ^[fù^jÇ«y§m
á@A«a¶Ú\x7f?
>0¶ìh?\x0fåi\x7f
>
>ÿôèº{.nÇ+·®+%Ëÿ±éݶ\x17¥wÿº{.nÇ+·¥{±þG«éÿ{ayº\x1dÊÚë,j\a¢f£¢·hïêÿêçz_è®\x03(éÝ¢j"ú\x1a¶^[m§ÿÿ¾\a«þG«éÿ¢¸?¨èÚ&£ø§~á¶iOæ¬z·vØ^\x14\x04\x1a¶^[m§ÿÿÃ\fÿ¶ìÿ¢¸?I¥
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Re: question about splice
@ 2013-07-26 7:53 ` majianpeng
0 siblings, 0 replies; 6+ messages in thread
From: majianpeng @ 2013-07-26 7:53 UTC (permalink / raw)
To: Gu Zheng; +Cc: Al Viro, linux-fsdevel, linux-kernel
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset="gb2312", Size: 2006 bytes --]
>Hi Jianpeng,
>
>On 07/26/2013 03:08 PM, majianpeng wrote:
>
>> Hi all,
>> I used splice and found a prolem(at least i call).
>> The demo is:
>> A:splice(regularfileA--->pipe);
>> B:splice(pipe--->regularfileB)
>> Before do B, we modify the data of regA which now in pipe. The data to regularfileB willbe change.
>> If we used the buff
>> A:read(regA, buff);
>> B: write(buff, regB);
>> After A, the contend of regA can't effect the buff.
>> Review the code of splice,I know the pipe share the pagecache of regA.
>
>Right. And also this is the splice's original design intention, using share mmap rather
>than copy_to_user/copy_from_user in order to achieve zero-copy.
>
If it use some method like COW, i think it can avoid this problem.
>Thanks,
>Gu
>
>> Maybe this is not a problem or am i missing something?
>
>>
>> Thanks!
>> Jianpeng MaN§²æìr¸yúèØb²X¬¶Ç§vØ^?)Þº{.n?+·¥{±êçzX§¶\x17¡Ü¨}©²Æ z?&j:+v¨?\a«êçzZ+?+zf£¢·h§~Ûi?ûàz?\x1e®w¥¢??¨è?&?)ߢ^[fù^jÇ«y§m
á@A«a¶Ú\x7f?
>0¶ìh?\x0fåi\x7f
>
>
Thanks!
Jianpeng Ma
>Hi Jianpeng,
>
>On 07/26/2013 03:08 PM, majianpeng wrote:
>
>> Hi all,
>> I used splice and found a prolem(at least i call).
>> The demo is:
>> A:splice(regularfileA--->pipe);
>> B:splice(pipe--->regularfileB)
>> Before do B, we modify the data of regA which now in pipe. The data to regularfileB willbe change.
>> If we used the buff
>> A:read(regA, buff);
>> B: write(buff, regB);
>> After A, the contend of regA can't effect the buff.
>> Review the code of splice,I know the pipe share the pagecache of regA.
>
>Right. And also this is the splice's original design intention, using share mmap rather
>than copy_to_user/copy_from_user in order to achieve zero-copy.
>
>Thanks,
>Gu
>
>> Maybe this is not a problem or am i missing something?
>
>>
>> Thanks!
>> Jianpeng MaN§²æìr¸yúèØb²X¬¶Ç§vØ^?)Þº{.n?+·¥{±êçzX§¶\x17¡Ü¨}©²Æ z?&j:+v¨?\a«êçzZ+?+zf£¢·h§~Ûi?ûàz?\x1e®w¥¢??¨è?&?)ߢ^[fù^jÇ«y§m
á@A«a¶Ú\x7f?
>0¶ìh?\x0fåi\x7f
>
>
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2013-07-26 7:54 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-07-26 7:08 question about splice majianpeng
2013-07-26 7:08 ` majianpeng
2013-07-26 7:17 ` Gu Zheng
2013-07-26 7:17 ` Gu Zheng
2013-07-26 7:53 ` majianpeng
2013-07-26 7:53 ` majianpeng
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.