linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Dan Magenheimer <dan.magenheimer@oracle.com>
To: konrad@darnok.org
Cc: Nitin Gupta <ngupta@vflare.org>,
	linux-mm@kvack.org, Seth Jennings <sjenning@linux.vnet.ibm.com>,
	Sasha Levin <levinsasha928@gmail.com>,
	Konrad Wilk <konrad.wilk@oracle.com>
Subject: RE: help converting zcache from sysfs to debugfs?
Date: Wed, 20 Jun 2012 08:24:04 -0700 (PDT)	[thread overview]
Message-ID: <71fe129f-25c2-471b-b3f1-42706ba31048@default> (raw)
In-Reply-To: <CAPbh3rtA3AcR3TU2-dGpgLOR-TfkXcGAmZJASDwAdsEi_GfK-w@mail.gmail.com>

> From: Konrad Rzeszutek Wilk [mailto:konrad@darnok.org]
> Subject: Re: help converting zcache from sysfs to debugfs?
> 
> On Jun 19, 2012 8:30 PM, "Dan Magenheimer" <dan.magenheimer@oracle.com> wrote:
> >
> > Zcache (in staging) has a large number of read-only counters that
> > are primarily of interest to developers.  These counters are currently
> > visible from sysfs.  However sysfs is not really appropriate and
> > zcache will need to switch to debugfs before it can be promoted
> > out of staging.
> >
> > For some of the counters, it is critical that they remain accurate so
> > an atomic_t must be used.  But AFAICT there is no way for debugfs
> > to work with atomic_t.
> 
> Which ones must be atomic? Do they really need to be atomic if they are for diagnostics/developers?
>  :
> A dozen that _MUST_ be atomic?

Hi Konrad --

On second look, there are only eight.  They are unsigned, go
up and down, and the code needs to know if/when they are zero
(or BUG if they go below zero).  When viewed by a developer
(or very savvy administrator), they can be viewed directly or
feed into analysis tools that would likely get very confused
by "huge" ("negative unsigned") values.  Recently, Seth changed
one zcache counter from unsigned to atomic_t for this reason.

Thanks,
Dan

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

  reply	other threads:[~2012-06-20 15:25 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-06-20  0:29 help converting zcache from sysfs to debugfs? Dan Magenheimer
2012-06-20 11:03 ` Konrad Rzeszutek Wilk
2012-06-20 15:24   ` Dan Magenheimer [this message]
2012-06-20 14:20 ` Seth Jennings
2012-06-20 14:36 ` Seth Jennings
2012-06-20 15:30   ` Dan Magenheimer
2012-06-20 15:40     ` Seth Jennings
2012-06-20 16:56     ` Konrad Rzeszutek Wilk

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=71fe129f-25c2-471b-b3f1-42706ba31048@default \
    --to=dan.magenheimer@oracle.com \
    --cc=konrad.wilk@oracle.com \
    --cc=konrad@darnok.org \
    --cc=levinsasha928@gmail.com \
    --cc=linux-mm@kvack.org \
    --cc=ngupta@vflare.org \
    --cc=sjenning@linux.vnet.ibm.com \
    /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;
as well as URLs for NNTP newsgroup(s).