All of lore.kernel.org
 help / color / mirror / Atom feed
From: Will Deacon <will.deacon@arm.com>
To: Catalin Marinas <catalin.marinas@arm.com>
Cc: Peter Maydell <peter.maydell@linaro.org>,
	Vijay Kilari <vijay.kilari@gmail.com>,
	Suzuki K Poulose <Suzuki.Poulose@arm.com>,
	Vijaya Kumar K <vijayak@caviumnetworks.com>,
	suresh knv <knv.suresh2009@gmail.com>,
	Vijaya Kumar K <Vijaya.Kumar@caviumnetworks.com>,
	QEMU Developers <qemu-devel@nongnu.org>,
	Prasun Kapoor <Prasun.Kapoor@caviumnetworks.com>,
	qemu-arm <qemu-arm@nongnu.org>,
	Suresh <ksuresh@caviumnetworks.com>,
	Paolo Bonzini <pbonzini@redhat.com>
Subject: Re: [Qemu-devel] [RFC PATCH v2 2/3] utils: Add cpuinfo helper to fetch /proc/cpuinfo
Date: Tue, 10 May 2016 11:24:04 +0100	[thread overview]
Message-ID: <20160510102403.GE22813@arm.com> (raw)
In-Reply-To: <20160509134410.GA2504@localhost.localdomain>

On Mon, May 09, 2016 at 01:44:11PM +0000, Catalin Marinas wrote:
> On Mon, May 09, 2016 at 12:21:08PM +0100, Peter Maydell wrote:
> > On 9 May 2016 at 11:59, Suzuki K Poulose <Suzuki.Poulose@arm.com> wrote:
> > > Well, we have been waiting for a use case, like this, before we merge
> > > the series.
> > 
> > This isn't a great strategy for moving people away from things
> > you'd like them to avoid like parsing /proc/cpuinfo, because typically
> > userspace app writers are not very interested in coding to facilities
> > which don't exist yet, and will prefer to make do with what's actually
> > present in the kernel today... You need to provide the improved API,
> > and then it needs to get out into kernel versions in distros and
> > otherwise, and only then are you likely to get app developers who
> > will start to say "this is useful".
> 
> The problem is that the way kernel people think the API may be improved
> does not always match the use-cases required by app writers. One example
> here is exposing MIDR via MRS emulation, we know there are problems with
> big.LITTLE and the only clear answer I got so far is that we ignore such
> configurations. We don't even have a way to tell user space that this is
> a heterogeneous CPU configuration, unless we add another HWCAP bit
> specifically for this (or the opposite: HWCAP_HOMOGENEOUS_CPUS).

Personally, I think we should expose big.LITTLE as-is to userspace. That
is, if you execute an mrs instruction you'll get whichever core the
emulation happens to run on. This might even be useful to things like
pinned threadpools w/ userspace schedulers sitting on top.

> That said, I'm perfectly fine with exposing:
> 
> 	/sys/devices/system/cpu/cpu$ID/identification/
> 							\- midr
> 							\- revidr
> 
> I had the wrong impression that we already merged this part but Suzuki
> just pointed out to me that it's not.

Yes, there are use-cases for this interface as well. I don't think it's
a choice between one or the other and I firmly believe we need both (the
sysfs and mrs code).

> I think our 4.7-rc1 tree is pretty much frozen to new features now,
> though the sysfs patch is relatively small (I'll let Will comment):

The merge window opens in less than a week, so it's fixes only atm.

Will

WARNING: multiple messages have this Message-ID (diff)
From: Will Deacon <will.deacon@arm.com>
To: Catalin Marinas <catalin.marinas@arm.com>
Cc: Peter Maydell <peter.maydell@linaro.org>,
	Suzuki K Poulose <Suzuki.Poulose@arm.com>,
	Vijay Kilari <vijay.kilari@gmail.com>,
	Vijaya Kumar K <vijayak@caviumnetworks.com>,
	qemu-arm <qemu-arm@nongnu.org>,
	Paolo Bonzini <pbonzini@redhat.com>,
	QEMU Developers <qemu-devel@nongnu.org>,
	Prasun Kapoor <Prasun.Kapoor@caviumnetworks.com>,
	suresh knv <knv.suresh2009@gmail.com>,
	Vijaya Kumar K <Vijaya.Kumar@caviumnetworks.com>,
	Suresh <ksuresh@caviumnetworks.com>
Subject: Re: [Qemu-devel] [RFC PATCH v2 2/3] utils: Add cpuinfo helper to fetch /proc/cpuinfo
Date: Tue, 10 May 2016 11:24:04 +0100	[thread overview]
Message-ID: <20160510102403.GE22813@arm.com> (raw)
In-Reply-To: <20160509134410.GA2504@localhost.localdomain>

On Mon, May 09, 2016 at 01:44:11PM +0000, Catalin Marinas wrote:
> On Mon, May 09, 2016 at 12:21:08PM +0100, Peter Maydell wrote:
> > On 9 May 2016 at 11:59, Suzuki K Poulose <Suzuki.Poulose@arm.com> wrote:
> > > Well, we have been waiting for a use case, like this, before we merge
> > > the series.
> > 
> > This isn't a great strategy for moving people away from things
> > you'd like them to avoid like parsing /proc/cpuinfo, because typically
> > userspace app writers are not very interested in coding to facilities
> > which don't exist yet, and will prefer to make do with what's actually
> > present in the kernel today... You need to provide the improved API,
> > and then it needs to get out into kernel versions in distros and
> > otherwise, and only then are you likely to get app developers who
> > will start to say "this is useful".
> 
> The problem is that the way kernel people think the API may be improved
> does not always match the use-cases required by app writers. One example
> here is exposing MIDR via MRS emulation, we know there are problems with
> big.LITTLE and the only clear answer I got so far is that we ignore such
> configurations. We don't even have a way to tell user space that this is
> a heterogeneous CPU configuration, unless we add another HWCAP bit
> specifically for this (or the opposite: HWCAP_HOMOGENEOUS_CPUS).

Personally, I think we should expose big.LITTLE as-is to userspace. That
is, if you execute an mrs instruction you'll get whichever core the
emulation happens to run on. This might even be useful to things like
pinned threadpools w/ userspace schedulers sitting on top.

> That said, I'm perfectly fine with exposing:
> 
> 	/sys/devices/system/cpu/cpu$ID/identification/
> 							\- midr
> 							\- revidr
> 
> I had the wrong impression that we already merged this part but Suzuki
> just pointed out to me that it's not.

Yes, there are use-cases for this interface as well. I don't think it's
a choice between one or the other and I firmly believe we need both (the
sysfs and mrs code).

> I think our 4.7-rc1 tree is pretty much frozen to new features now,
> though the sysfs patch is relatively small (I'll let Will comment):

The merge window opens in less than a week, so it's fixes only atm.

Will

  reply	other threads:[~2016-05-10 10:31 UTC|newest]

Thread overview: 46+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-04-07  9:58 [Qemu-arm] [RFC PATCH v2 0/3] ARM64: Live migration optimization vijayak
2016-04-07  9:58 ` [Qemu-devel] " vijayak
2016-04-07  9:58 ` [Qemu-arm] [RFC PATCH v2 1/3] target-arm: Use Neon for zero checking vijayak
2016-04-07  9:58   ` [Qemu-devel] " vijayak
2016-04-07 10:30   ` [Qemu-arm] " Paolo Bonzini
2016-04-07 10:30     ` [Qemu-devel] " Paolo Bonzini
2016-04-07 10:44     ` [Qemu-arm] " Peter Maydell
2016-04-07 10:44       ` [Qemu-devel] " Peter Maydell
2016-04-07 10:44   ` [Qemu-arm] " Peter Maydell
2016-04-07 10:44     ` [Qemu-devel] " Peter Maydell
2016-04-09 22:45   ` [Qemu-arm] " Richard Henderson
2016-04-09 22:45     ` Richard Henderson
2016-04-11 10:40     ` Peter Maydell
2016-04-11 10:40       ` Peter Maydell
2016-04-07  9:58 ` [Qemu-arm] [RFC PATCH v2 2/3] utils: Add cpuinfo helper to fetch /proc/cpuinfo vijayak
2016-04-07  9:58   ` [Qemu-devel] " vijayak
2016-04-07 10:11   ` [Qemu-arm] " Peter Maydell
2016-04-07 10:11     ` [Qemu-devel] " Peter Maydell
2016-04-07 10:56     ` [Qemu-arm] " Vijay Kilari
2016-04-07 10:56       ` [Qemu-devel] " Vijay Kilari
2016-04-07 11:45       ` [Qemu-arm] " Peter Maydell
2016-04-07 11:45         ` [Qemu-devel] " Peter Maydell
2016-04-08  6:21         ` [Qemu-arm] " Vijay Kilari
2016-04-08  6:21           ` [Qemu-devel] " Vijay Kilari
2016-04-08  9:43           ` [Qemu-arm] " Peter Maydell
2016-04-08  9:43             ` [Qemu-devel] " Peter Maydell
2016-04-11  6:52             ` [Qemu-arm] " Vijay Kilari
2016-04-11  6:52               ` [Qemu-devel] " Vijay Kilari
2016-04-11  9:37               ` [Qemu-arm] " Suzuki K Poulose
2016-04-11  9:37                 ` [Qemu-devel] " Suzuki K Poulose
2016-04-13  9:54                 ` [Qemu-arm] " Vijay Kilari
2016-04-13  9:54                   ` [Qemu-devel] " Vijay Kilari
2016-04-13  9:59                   ` Suzuki K Poulose
2016-04-13  9:59                     ` Suzuki K Poulose
2016-05-09  3:30                     ` [Qemu-arm] " Vijay Kilari
2016-05-09  3:30                       ` [Qemu-devel] " Vijay Kilari
2016-05-09 10:59                       ` [Qemu-arm] " Suzuki K Poulose
2016-05-09 10:59                         ` [Qemu-devel] " Suzuki K Poulose
2016-05-09 11:21                         ` [Qemu-arm] " Peter Maydell
2016-05-09 11:21                           ` [Qemu-devel] " Peter Maydell
2016-05-09 13:44                           ` Catalin Marinas
2016-05-09 13:44                             ` Catalin Marinas
2016-05-10 10:24                             ` Will Deacon [this message]
2016-05-10 10:24                               ` Will Deacon
2016-05-10 13:06                               ` [Qemu-arm] " Catalin Marinas
2016-05-10 13:06                                 ` [Qemu-devel] " Catalin Marinas

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=20160510102403.GE22813@arm.com \
    --to=will.deacon@arm.com \
    --cc=Prasun.Kapoor@caviumnetworks.com \
    --cc=Suzuki.Poulose@arm.com \
    --cc=Vijaya.Kumar@caviumnetworks.com \
    --cc=catalin.marinas@arm.com \
    --cc=knv.suresh2009@gmail.com \
    --cc=ksuresh@caviumnetworks.com \
    --cc=pbonzini@redhat.com \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-arm@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    --cc=vijay.kilari@gmail.com \
    --cc=vijayak@caviumnetworks.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 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.