[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20200908155409.GB13593@lst.de>
Date: Tue, 8 Sep 2020 17:54:09 +0200
From: Christoph Hellwig <hch@....de>
To: Maor Gottlieb <maorg@...dia.com>
Cc: Christoph Hellwig <hch@....de>, Leon Romanovsky <leon@...nel.org>,
Doug Ledford <dledford@...hat.com>,
Jason Gunthorpe <jgg@...dia.com>, linux-kernel@...r.kernel.org,
linux-rdma@...r.kernel.org
Subject: Re: [PATCH rdma-next 3/4] lib/scatterlist: Add support in dynamic
allocation of SG table from pages
On Mon, Sep 07, 2020 at 03:44:08PM +0300, Maor Gottlieb wrote:
>>> +{
>>> +#ifdef CONFIG_ARCH_NO_SG_CHAIN
>>> + if (append->left_pages)
>>> + return ERR_PTR(-EOPNOTSUPP);
>>> +#endif
>> Which makes this API entirely useless for !CONFIG_ARCH_NO_SG_CHAIN,
>> doesn't it? Wouldn't it make more sense to not provide it for that
>> case and add an explicitl dependency in the callers?
>
> Current implementation allow us to support small memory registration which
> not require chaining. I am not aware which archs has the SG_CHAIN support
> and I don't want to break it so I can't add it to as dependency to the
> Kconfig. Another option is to do the logic in the caller, but it isn't
> clean.
But does the caller handle the -EOPNOTSUPP properly? I think right now
it will just fail the large registration that worked before this patchset.
Given that ARCH_NO_SG_CHAIN is only true for alpha, parisc and a few
arm subarchitectures I think just not supporting umem is probably
cleared. And eventually we'll need to drop ARCH_NO_SG_CHAIN entirely.
Powered by blists - more mailing lists