login
Header Space

 
 

Re: Diffenrence Completion and Semaphore

Score:
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Arjan van de Ven <arjan@...>
Cc: <kernel-mentors@...>
Date: Friday, May 19, 2006 - 9:52 am

------=_Part_686_30276318.1148046752957
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: quoted-printable
Content-Disposition: inline

Thank you. Your comments help me so much.
It seems to solve my question between completion and semaphore.

Have a nice day.



On 5/19/06, Arjan van de Ven <arjan@infradead.org> wrote:

------=_Part_686_30276318.1148046752957
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
Content-Disposition: inline

<div>Thank you. Your comments help me so much. </div>
<div>It seems to solve my question between completion and semaphore. </div>
<div>&nbsp;</div>
<div>Have a nice day.</div>
<div><br><br>&nbsp;</div>
<div><span class=3D"gmail_quote">On 5/19/06, <b class=3D"gmail_sendername">=
Arjan van de Ven</b> &lt;<a href=3D"mailto:arjan@infradead.org">arjan@infra=
dead.org</a>&gt; wrote:</span>
<blockquote class=3D"gmail_quote" style=3D"PADDING-LEFT: 1ex; MARGIN: 0px 0=
px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">On Fri, 2006-05-19 at 12:41 +090=
0, minchan Kim wrote:<br>&gt; Thanks to your commenting.<br>&gt;<br>&gt; I =
understand your point.&nbsp;&nbsp;But I see the book &quot;Understanding of=
 the
<br>&gt; Linux Kernel&quot;, it says &quot;Semaphore happen race condition =
problem in the<br>&gt; SMP envirioment since call up and down concurrency. =
But Completion<br>&gt; isn't&quot;<br>&gt;<br>&gt; I don't understand it. D=
o you understand it?
<br><br>I think they mean that semaphores will cause exclusion (but really,=
 use<br>mutexes, much easier and they are replacing semaphores), while<br>c=
ompletions do not cause exclusion...<br><br>eg you can use a mutex to preve=
nt concurrent access (as the code snippet
<br>I gave you before shows), while a completion really doesn't do that.<br=
ENTIRELY different things. Not even comparable. So saying
<br>&quot;they're different in &lt;this tiny detail&gt;&quot; sort of impli=
es they're<br>similar constructs in many other ways. They are not. Don't ev=
en think<br>they are.<br><br>(having said that, some people used to abuse s=
emaphores to do a
<br>completion type of behavior, which is where the confusion is coming<br>=
from, but just don't do that or even focus on that, it's like using the<br>=
back of a book to drive a nail in the wall and then ask &quot;what's the
<br>difference between a book and a hammer since I now have both&quot;. The=
<br>answer is &quot;who cares. Just use the hammer for your own sanity&quot=
; :)<br><br><br></blockquote></div><br>

------=_Part_686_30276318.1148046752957--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Hi - Need a mentor, Dheeraj Kandula, (Wed Jul 11, 5:22 pm)
Coding Style question - alignment of variables, Prarit Bhargava, (Thu Jan 26, 5:14 pm)
RFC: SPI patch, Gary Jennejohn, (Thu Jan 10, 9:46 am)
driver for review, Bahadir Balban, (Thu Apr 13, 12:45 pm)
Diffenrence Completion and Semaphore, minchan Kim, (Thu May 18, 9:47 pm)
I need a mentor!, Joe moo, (Sun Aug 24, 5:18 pm)
HELP : taking up a kernel project, vibi sreenivasan, (Mon Jul 14, 9:16 am)
enthusiast looking for a mentor, Shobhit Jindal, (Thu Aug 24, 10:53 am)
jim.cromie has invited you to Spokeo, , (Tue Mar 25, 8:07 am)
Dynsched - dynamic cpu scheduler selection, Felix Obenhuber, (Sat Nov 18, 11:29 am)
Filesystem compression, kishore, (Sun Dec 10, 10:26 am)
swap: which is the maximum size allowed?, Eriberto, (Sun Jan 28, 4:07 pm)
(no subject), chandrashekhar, (Wed Feb 21, 6:28 am)
How can I join an active project?, Jiancong Xie, (Wed Apr 18, 4:40 am)
Build and test system for multiple kernels, François-Frédéric Ozog..., (Thu Nov 22, 4:06 am)
Re: [RFC]__sock_create() change, pradeep singh, (Mon May 14, 4:12 am)
[PATCH] char: Nano 7240 watchdog driver, Gilles GIGAN, (Fri Oct 5, 11:10 pm)
Re: I need a mentor!, Ahmed S. Darwish, (Mon Aug 25, 9:09 am)
Re: HELP : taking up a kernel project, Ahmed S. Darwish, (Tue Jul 15, 8:32 am)
Re: Build and test system for multiple kernels, Stjepan Gros, (Thu Nov 22, 9:41 am)
Re: [PATCH] char: Nano 7240 watchdog driver, Dave Jones, (Sat Oct 6, 12:02 am)
Re: [PATCH] char: Nano 7240 watchdog driver, Randy Dunlap, (Sat Oct 6, 1:27 am)
Re: [PATCH] char: Nano 7240 watchdog driver, Arjan van de Ven, (Sat Oct 6, 4:24 pm)
Re: Hi - Need a mentor, Randy Dunlap, (Wed Jul 11, 9:55 pm)
Re: [RFC]__sock_create() change, Arjan van de Ven, (Mon May 14, 11:10 am)
Re: [RFC]__sock_create() change, pradeep singh, (Tue May 15, 1:09 am)
Re: [RFC]__sock_create() change, Chris Wedgwood, (Mon May 14, 6:51 pm)
Re: How can I join an active project?, Arjan van de Ven, (Fri Apr 20, 2:20 pm)
Re: How can I join an active project?, Felix Obenhuber, (Wed Apr 18, 12:41 pm)
Re: (no subject), Randy Dunlap, (Wed Feb 21, 4:56 pm)
Re: (no subject), Greg KH, (Wed Feb 21, 4:45 pm)
Re: swap: which is the maximum size allowed?, Tony Clayton, (Mon Jan 29, 3:24 am)
Re: swap: which is the maximum size allowed?, Arjan van de Ven, (Wed Jan 31, 6:38 am)
Re: Filesystem compression, Phillip Lougher, (Mon Dec 11, 12:09 am)
Re: enthusiast looking for a mentor, Jim Cromie, (Thu Aug 24, 1:05 pm)
Re: enthusiast looking for a mentor, Vivek Joshi, (Fri Aug 25, 2:13 am)
Re: Expertise required on building code for SMP, Arjan van de Ven, (Thu Jul 13, 3:45 am)
Re: Diffenrence Completion and Semaphore, Zach Brown, (Thu May 18, 10:32 pm)
Re: Diffenrence Completion and Semaphore, Arjan van de Ven, (Thu May 18, 10:02 pm)
Re: Diffenrence Completion and Semaphore, minchan Kim, (Thu May 18, 11:41 pm)
Re: Diffenrence Completion and Semaphore, Arjan van de Ven, (Fri May 19, 8:52 am)
Re: Diffenrence Completion and Semaphore, minchan Kim, (Fri May 19, 9:52 am)
Re: driver for review, Peter Korsgaard, (Fri Apr 14, 2:07 pm)
RE: driver for review, Dustin McIntire, (Mon Apr 17, 9:31 pm)
Re: driver for review, Peter Korsgaard, (Sun Apr 23, 2:54 pm)
RE: driver for review, Dustin McIntire, (Sun Apr 23, 3:35 pm)
Re: driver for review, Bahadir Balban, (Tue Apr 18, 11:17 am)
RE: driver for review, Dustin McIntire, (Wed Apr 19, 1:12 am)
Re: driver for review, Matt Mackall, (Thu Apr 13, 4:20 pm)
Re: driver for review, Bahadir Balban, (Tue Apr 18, 11:01 am)
Re: Coding Style question - alignment of variables, Prarit Bhargava, (Thu Jan 26, 5:28 pm)
Re: Coding Style question - alignment of variables, Jim Cromie, (Thu Jan 26, 7:06 pm)
Re: Coding Style question - alignment of variables, Muli Ben-Yehuda, (Thu Jan 26, 7:11 pm)
speck-geostationary