From: Tejun Heo <teheo@suse.de>
To: Neil Brown <neilb@suse.de>
Cc: "Eric W. Biederman" <ebiederm@xmission.com>,
Greg Kroah-Hartman <gregkh@suse.de>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/3] sysfs: simplify handling for s_active refcount
Date: Fri, 26 Mar 2010 14:42:57 +0900 [thread overview]
Message-ID: <4BAC4961.4060302@suse.de> (raw)
In-Reply-To: <20100326163236.1ffb2c2b@notabene.brown>
Hello, Neil.
On 03/26/2010 02:32 PM, Neil Brown wrote:
> Hopefully if there are really problems (maybe I've fundamentally
> misunderstood caches) they can be easily resolved (a couple of memory
> barriers at worst?).
Oh, no, please don't do that. That will inject a whole lot more of
complexity into the mix. Now, it's only a problem of logical
complexity. If you add memory barriers there, it not only complicates
the problem itself beyond recognition but also reduces problem
reproducibility (especially because x86/64 are relatively strongly
ordered) and thus test coverage significantly. Now the refcounting
can be understood by most people who put some time into it but if you
put memory barriers into it, only Oleg would be able to identify
problems. :-P
If you really want to kill the bias and in an easy readable way,
please put it inside a struct w/ dedicated spinlock but if you are
gonna do that it might as well be better to simply implement the bias
anti-pattern correctly there once.
Thanks.
--
tejun
next prev parent reply other threads:[~2010-03-26 5:43 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-03-24 3:20 [PATCH 0/3] refcounting improvements in sysfs NeilBrown
2010-03-24 3:20 ` [PATCH 1/3] sysfs: simplify handling for s_active refcount NeilBrown
2010-03-26 4:24 ` Eric W. Biederman
2010-03-26 5:32 ` Neil Brown
2010-03-26 5:42 ` Tejun Heo [this message]
2010-03-26 7:53 ` Eric W. Biederman
2010-03-29 4:43 ` Neil Brown
2010-03-29 7:47 ` Neil Brown
2010-03-24 3:20 ` [PATCH 2/3] sysfs: make s_count a kref NeilBrown
2010-03-26 4:29 ` Eric W. Biederman
2010-03-24 3:20 ` [PATCH 3/3] kref: create karef and use for sysfs_dirent->s_active NeilBrown
2010-03-26 4:50 ` Eric W. Biederman
2010-03-26 3:10 ` [PATCH 0/3] refcounting improvements in sysfs Eric W. Biederman
2010-03-26 3:28 ` Neil Brown
2010-03-26 4:49 ` Tejun Heo
2010-03-26 5:10 ` Tejun Heo
2010-03-26 6:02 ` Neil Brown
2010-03-26 6:32 ` Tejun Heo
2010-03-29 5:10 ` Neil Brown
2010-03-31 3:20 ` Tejun Heo
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4BAC4961.4060302@suse.de \
--to=teheo@suse.de \
--cc=ebiederm@xmission.com \
--cc=gregkh@suse.de \
--cc=linux-kernel@vger.kernel.org \
--cc=neilb@suse.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox