From: Stephen Boyd <sboyd-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org>
To: "Måns Rullgård" <mans-2StjZFpD7GcAvxtiuMwx3w@public.gmane.org>
Cc: Rob Herring <robherring2-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
Mark Rutland <mark.rutland-5wv7dgnIgG8@public.gmane.org>,
Pawel Moll <pawel.moll-5wv7dgnIgG8@public.gmane.org>,
Ian Campbell
<ijc+devicetree-KcIKpvwj1kUDXYZnReoRVg@public.gmane.org>,
Kumar Gala <galak-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org>,
"devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
<devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
"linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
<linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>
Subject: Re: [PATCH v2 1/2] devicetree: add binding for generic mmio clocksource
Date: Fri, 9 Oct 2015 17:00:56 -0700 [thread overview]
Message-ID: <20151010000047.GU26883@codeaurora.org> (raw)
In-Reply-To: <yw1xtwpzj01x.fsf-OEaqT8BN2ezZK2NkWkPsZwC/G2K4zDHf@public.gmane.org>
On 10/09, Måns Rullgård wrote:
> Stephen Boyd <sboyd-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org> writes:
>
> > On 10/09, Rob Herring wrote:
> >>
> >> Adding a ptr to the callback seems fine to me.
> >>
> >
> > Does that mean a flag day? Urgh. Pain. I'm not opposed to adding
> > a pointer, in fact it might be better for performance so that we
> > don't take a cache miss in read() functions that need to load
> > some pointer. We were talking about that problem a few months
> > ago, but nothing came of it.
>
> Flag day in what sense? There aren't all that many users of the
> interface (56, to be precise), and sched_clock_register() isn't
> exported.
That's exactly what a flag day is. Lots of coordination, lots of
acks, etc. Last time when I changed the registration API I made a
new registration API, moved every caller over one by one, and
then deleted the old registration API. That's how you manage a
flag day.
We could probably do the same thing again with two different
types of registration APIs so that we move over users one by one.
The old registration API would be wrapped with a sched_clock
local function that doesn't pass the pointer it gets called with,
while the new registration API would fill in the function pointer
that we call directly from the core code. The double function
call is probably bad for performance, so I guess we should get
rid of it and always pass the pointer to the callback. But this
is at least a method to convert everything gradually without
breaking users that may be going through different trees.
> Verifying the change will be a minor pain, but I don't see
> why it should have any major consequences. Obviously I'd just set the
> pointer to null for existing users and leave it for the respective
> maintainers to make proper use of it where sensible.
>
Sure.
--
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
a Linux Foundation Collaborative Project
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
WARNING: multiple messages have this Message-ID (diff)
From: Stephen Boyd <sboyd@codeaurora.org>
To: "Måns Rullgård" <mans@mansr.com>
Cc: Rob Herring <robherring2@gmail.com>,
Mark Rutland <mark.rutland@arm.com>,
Pawel Moll <pawel.moll@arm.com>,
Ian Campbell <ijc+devicetree@hellion.org.uk>,
Kumar Gala <galak@codeaurora.org>,
"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v2 1/2] devicetree: add binding for generic mmio clocksource
Date: Fri, 9 Oct 2015 17:00:56 -0700 [thread overview]
Message-ID: <20151010000047.GU26883@codeaurora.org> (raw)
In-Reply-To: <yw1xtwpzj01x.fsf@unicorn.mansr.com>
On 10/09, Måns Rullgård wrote:
> Stephen Boyd <sboyd@codeaurora.org> writes:
>
> > On 10/09, Rob Herring wrote:
> >>
> >> Adding a ptr to the callback seems fine to me.
> >>
> >
> > Does that mean a flag day? Urgh. Pain. I'm not opposed to adding
> > a pointer, in fact it might be better for performance so that we
> > don't take a cache miss in read() functions that need to load
> > some pointer. We were talking about that problem a few months
> > ago, but nothing came of it.
>
> Flag day in what sense? There aren't all that many users of the
> interface (56, to be precise), and sched_clock_register() isn't
> exported.
That's exactly what a flag day is. Lots of coordination, lots of
acks, etc. Last time when I changed the registration API I made a
new registration API, moved every caller over one by one, and
then deleted the old registration API. That's how you manage a
flag day.
We could probably do the same thing again with two different
types of registration APIs so that we move over users one by one.
The old registration API would be wrapped with a sched_clock
local function that doesn't pass the pointer it gets called with,
while the new registration API would fill in the function pointer
that we call directly from the core code. The double function
call is probably bad for performance, so I guess we should get
rid of it and always pass the pointer to the callback. But this
is at least a method to convert everything gradually without
breaking users that may be going through different trees.
> Verifying the change will be a minor pain, but I don't see
> why it should have any major consequences. Obviously I'd just set the
> pointer to null for existing users and leave it for the respective
> maintainers to make proper use of it where sensible.
>
Sure.
--
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
a Linux Foundation Collaborative Project
next prev parent reply other threads:[~2015-10-10 0:00 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-10-07 15:37 [PATCH v2 1/2] devicetree: add binding for generic mmio clocksource Mans Rullgard
2015-10-07 15:37 ` Mans Rullgard
2015-10-07 15:37 ` [PATCH v2 2/2] clocksource: mmio: add devicetree support Mans Rullgard
[not found] ` <1444232234-2133-1-git-send-email-mans-2StjZFpD7GcAvxtiuMwx3w@public.gmane.org>
2015-10-07 15:47 ` [PATCH v2 1/2] devicetree: add binding for generic mmio clocksource Mark Rutland
2015-10-07 15:47 ` Mark Rutland
2015-10-07 16:47 ` Måns Rullgård
2015-10-07 16:47 ` Måns Rullgård
[not found] ` <yw1xvbaik4mn.fsf-OEaqT8BN2ezZK2NkWkPsZwC/G2K4zDHf@public.gmane.org>
2015-10-07 17:03 ` Mark Rutland
2015-10-07 17:03 ` Mark Rutland
2015-10-08 9:15 ` Måns Rullgård
2015-10-08 9:15 ` Måns Rullgård
2015-10-07 19:40 ` Rob Herring
[not found] ` <CAL_JsqJDZKTB8xowVdGK=9=4omp_wHdwqYP_Ln3-QdknjAwxSg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2015-10-08 9:24 ` Måns Rullgård
2015-10-08 9:24 ` Måns Rullgård
2015-10-09 16:19 ` Måns Rullgård
2015-10-09 16:19 ` Måns Rullgård
2015-10-09 17:53 ` Rob Herring
[not found] ` <CAL_JsqLSyCAFCHythKyyAXg_yEPLzdYA+tJq2cj_NnXL+Et5GQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2015-10-09 18:46 ` Stephen Boyd
2015-10-09 18:46 ` Stephen Boyd
[not found] ` <20151009184632.GR26883-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org>
2015-10-09 19:48 ` Måns Rullgård
2015-10-09 19:48 ` Måns Rullgård
[not found] ` <yw1xtwpzj01x.fsf-OEaqT8BN2ezZK2NkWkPsZwC/G2K4zDHf@public.gmane.org>
2015-10-10 0:00 ` Stephen Boyd [this message]
2015-10-10 0:00 ` Stephen Boyd
2015-10-09 21:59 ` Måns Rullgård
2015-10-09 21:59 ` Måns Rullgård
2015-10-10 0:01 ` Stephen Boyd
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=20151010000047.GU26883@codeaurora.org \
--to=sboyd-sgv2jx0feol9jmxxk+q4oq@public.gmane.org \
--cc=devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=galak-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org \
--cc=ijc+devicetree-KcIKpvwj1kUDXYZnReoRVg@public.gmane.org \
--cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=mans-2StjZFpD7GcAvxtiuMwx3w@public.gmane.org \
--cc=mark.rutland-5wv7dgnIgG8@public.gmane.org \
--cc=pawel.moll-5wv7dgnIgG8@public.gmane.org \
--cc=robherring2-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
/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 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.