Linux CXL
 help / color / mirror / Atom feed
From: Jonathan Cameron <Jonathan.Cameron@Huawei.com>
To: Nabeel M Mohamed <nabeelmd.linux@gmail.com>
Cc: <linux-cxl@vger.kernel.org>,
	Alison Schofield <alison.schofield@intel.com>,
	Vishal Verma <vishal.l.verma@intel.com>,
	"Ira Weiny" <ira.weiny@intel.com>,
	Dan Williams <dan.j.williams@intel.com>, <linuxarm@huawei.com>
Subject: Re: [PATCH v2] cxl/pci: Set the device timestamp
Date: Thu, 23 Feb 2023 15:05:24 +0000	[thread overview]
Message-ID: <20230223150524.00002501@Huawei.com> (raw)
In-Reply-To: <Y/bjnb0gmmpkjk8r@nabeel-linux.myguest.virtualbox.org>

On Wed, 22 Feb 2023 21:55:09 -0600
Nabeel M Mohamed <nabeelmd.linux@gmail.com> wrote:

> On Wed, Feb 22, 2023 at 04:27:00PM +0000, Jonathan Cameron wrote:
> > On Wed, 22 Feb 2023 09:34:14 -0600
> > Nabeel M Mohamed <nabeelmd.linux@gmail.com> wrote:
> >   
> > > On Mon, Jan 30, 2023 at 03:13:27PM +0000, Jonathan Cameron wrote:  
> > > > CXL r3.0 section 8.2.9.4.2 "Set Timestamp" recommends that the host sets
> > > > the timestamp after every Conventional or CXL Reset to ensure accurate
> > > > timestamps. This should include on initial boot up. The time base that
> > > > is being set is used by a device for the poison list overflow timestamp
> > > > and all event timestamps.  Note that the command is optional and if
> > > > not supported and the device cannot return accurate timestamps it will
> > > > fill the fields in with an appropriate marker (see the specification
> > > > description of each timestamp).
> > > > 
> > > > Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
> > > >    
> > > 
> > > Hi Jonathan,
> > > 
> > > Could you please educate me on the reason for not supporting a
> > > "Get Timestamp" mailbox command at this time?
> > > 
> > > A use-case that I can think of for having "Get Timestamp" in the UAPI
> > > is to enable userspace to better correlate the timestamp in the device
> > > logs with the wall time by querying the current timestamp on the device.
> > > This could be useful if there's some inaccuracy or skew in the device
> > > timestamp.
> > > 
> > > Would that be a valid use-case or am I misunderstanding something here?
> > > 
> > > I can see why "Set Timestamp" is a kernel-internal command but fail to
> > > see why "Get Timestamp" cannot be in the UAPI.  
> >   
> 
> > Hi Nabeel,
> > 
> > I'd be fine with a patch adding the support, it just didn't solve my
> > immediate problem so I didn't want to make this patch more complex.
> > 
> > Jonathan  
> 
> Great, thanks for clarifying Jonathan!
> 
> I'll be happy to post a patch which adds support for "Get Timestamp".
> 
> Btw, this will be my first patch to the CXL driver.
> So, I'm wondering if there's any checklist listing the prerequisites
> for submitting a patch to the CXL driver - for instance, requirements
> on adding new tests for coverage, any existing CXL regression suites
> that the patch must pass, etc.
> 
> Any pointers on the above would be greatly appreciated!

As we are talking about a userspace exposed feature, support on the ndctl
/cxl tools should probably follow soon after the kernel side of things.

Jonathan

> 
> Thanks,
> Nabeel


  reply	other threads:[~2023-02-23 15:05 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-30 15:13 [PATCH v2] cxl/pci: Set the device timestamp Jonathan Cameron
2023-01-30 19:29 ` Dan Williams
2023-02-22 15:34 ` Nabeel M Mohamed
2023-02-22 16:27   ` Jonathan Cameron
2023-02-23  3:55     ` Nabeel M Mohamed
2023-02-23 15:05       ` Jonathan Cameron [this message]
2023-02-23 16:10         ` Nabeel M Mohamed
2023-02-23 16:42       ` Davidlohr Bueso
2023-02-23 22:11         ` Ira Weiny
2023-04-22  1:34         ` Dan Williams

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=20230223150524.00002501@Huawei.com \
    --to=jonathan.cameron@huawei.com \
    --cc=alison.schofield@intel.com \
    --cc=dan.j.williams@intel.com \
    --cc=ira.weiny@intel.com \
    --cc=linux-cxl@vger.kernel.org \
    --cc=linuxarm@huawei.com \
    --cc=nabeelmd.linux@gmail.com \
    --cc=vishal.l.verma@intel.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