All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jonathan Cameron <Jonathan.Cameron@Huawei.com>
To: Dan Williams <dan.j.williams@intel.com>
Cc: Ira Weiny <ira.weiny@intel.com>,
	"Jiang, Dave" <dave.jiang@intel.com>,
	Alison Schofield <alison.schofield@intel.com>,
	Vishal Verma <vishal.l.verma@intel.com>,
	Ben Widawsky <bwidawsk@kernel.org>, <linux-cxl@vger.kernel.org>
Subject: Re: [PATCH 1/3] cxl/mem: Fix command comment
Date: Thu, 5 Jan 2023 17:36:26 +0000	[thread overview]
Message-ID: <20230105173626.00005460@Huawei.com> (raw)
In-Reply-To: <63b4ec4e37cc1_5178e2941d@dwillia2-xfh.jf.intel.com.notmuch>

On Tue, 3 Jan 2023 19:02:38 -0800
Dan Williams <dan.j.williams@intel.com> wrote:

> Ira Weiny wrote:
> > The command comment had some minor grammatical errors.
> > 
> > Fix them.
> > 
> > Signed-off-by: Ira Weiny <ira.weiny@intel.com>
> > ---
> >  include/uapi/linux/cxl_mem.h | 6 +++---
> >  1 file changed, 3 insertions(+), 3 deletions(-)
> > 
> > diff --git a/include/uapi/linux/cxl_mem.h b/include/uapi/linux/cxl_mem.h
> > index c71021a2a9ed..555f9140e2bc 100644
> > --- a/include/uapi/linux/cxl_mem.h
> > +++ b/include/uapi/linux/cxl_mem.h
> > @@ -11,9 +11,9 @@
> >  /**
> >   * DOC: UAPI
> >   *
> > - * Not all of all commands that the driver supports are always available for use
> > - * by userspace. Userspace must check the results from the QUERY command in
> > - * order to determine the live set of commands.
> > + * Not all of the commands that the driver supports are available for use by
> > + * userspace at all times.  Userspace must check the results from the QUERY
> > + * command in order to determine the live set of commands.
> >   */  
> 
> It's interesting that these grammatical fixups further highlight that
> the existing description was a lie. This new wording makes it seem like
> QUERY informs about temporarily disabled commands (like those in the
> cxlds->exclusive_cmds set), in addition to the device enabled commands
> (those in the cxlds->enabled_cmds set).
> 
> It turns out this has always been a lie and the cxl tool checks if a
> command is supported and enabled by trying to execute it if it exists in
> the cxl_query_cmd() payload.
> 
> Now we could either go fix that, or change this comment to reflect the
> current reality that cxl_command_info.flags is always zero and the
> command info array is just telling you if the driver knows how to
> attempt the given command.

I'd really like to see a query mechanism that reflects whether the hardware
supports the command (plus all the other reasons why we might not be able to use
it - ultimately the question is 'can I issue this'). Some commands may
'take a while' so it's not nice to have to issue them to find out if they
exist given the discoverable nature hardware side.

Possible that mechanism is different from this one though...

Jonathan

> 
> >  
> >  #define CXL_MEM_QUERY_COMMANDS _IOR(0xCE, 1, struct cxl_mem_query_commands)
> > 
> > -- 
> > 2.38.1  
> 
> 


  reply	other threads:[~2023-01-05 17:36 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-12-27 14:52 [PATCH 0/3] CXL: Miscellaneous fixes Ira Weiny
2022-12-27 14:52 ` [PATCH 1/3] cxl/mem: Fix command comment Ira Weiny
2023-01-04  3:02   ` Dan Williams
2023-01-05 17:36     ` Jonathan Cameron [this message]
2023-01-05 18:01       ` Ira Weiny
2022-12-27 14:52 ` [PATCH 2/3] cxl/mem: Remove unused CXL_CMD_FLAG_NONE define Ira Weiny
2023-01-05 17:32   ` Jonathan Cameron
2022-12-27 14:52 ` [PATCH 3/3] cxl/uapi: Add warning on CXL command enum Ira Weiny
2023-01-05 17:31   ` Jonathan Cameron

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=20230105173626.00005460@Huawei.com \
    --to=jonathan.cameron@huawei.com \
    --cc=alison.schofield@intel.com \
    --cc=bwidawsk@kernel.org \
    --cc=dan.j.williams@intel.com \
    --cc=dave.jiang@intel.com \
    --cc=ira.weiny@intel.com \
    --cc=linux-cxl@vger.kernel.org \
    --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 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.