[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20091113.190954.189642997.davem@davemloft.net>
Date: Fri, 13 Nov 2009 19:09:54 -0800 (PST)
From: David Miller <davem@...emloft.net>
To: gregory.haskins@...il.com
Cc: herbert@...dor.apana.org.au, ghaskins@...ell.com, mst@...hat.com,
alacrityvm-devel@...ts.sourceforge.net,
linux-kernel@...r.kernel.org, netdev@...r.kernel.org
Subject: Re: [RFC PATCH] net: add dataref destructor to sk_buff
From: Gregory Haskins <gregory.haskins@...il.com>
Date: Fri, 13 Nov 2009 21:27:57 -0500
> Clearly there must be _some_ mechanism to synchronize (e.g.
> flush/barrier) though, right? Otherwise, that interface would seem to
> be quite prone to races and would likely be unusable. So what does
> said flush use to know when the buffer is free?
There is no such synchronization at all.
If some synchronization is required, it must be done at a higher
level.
For example, SAMBA can only use sendfile() to serve file contents when
the client holds an SMB "OP Lock" on the file. Luckily, by default
pretty much all SMB client implementations hold the OP Lock on a file
even just to read it (this is so that self-modifying autoexec.bat
scripts work :-)
But frankly most sendfile() consumers don't care, and the only thing
that really matters is that the checksum on the final TCP packet that
goes out is correct, and since we require card checksums to sendfile()
without copying, that is taken care of transparently.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists