[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20150402.135442.406267578423876673.davem@davemloft.net>
Date: Thu, 02 Apr 2015 13:54:42 -0400 (EDT)
From: David Miller <davem@...emloft.net>
To: sfeldma@...il.com
Cc: netdev@...r.kernel.org, jiri@...nulli.us,
roopa@...ulusnetworks.com, linux@...ck-us.net,
f.fainelli@...il.com, sridhar.samudrala@...el.com,
ronen.arad@...el.com
Subject: Re: [PATCH net-next v2 01/26] switchdev: introduce get/set attrs
ops
From: Scott Feldman <sfeldma@...il.com>
Date: Thu, 2 Apr 2015 10:38:56 -0700
> I looked at doing that with rocker for setting STP state. The driver
> does allocate some system memory blocks, conditionally, about 4 call
> levels down, and then it may or may not free them it. To do that all
> up-front in prepare, we'd need to traverse all the same code paths
> allocating memory as we go and stashing it in some transaction object
> passed from above, but skip any device accesses. And then in commit,
> go thru the same paths, but use stash memory from transaction object
> and this time do call into device. All of this to avoid failing
> commit due to OOM. So I reasoned OOM isn't a case worth the work
> because the system is pretty much hosed at that point anyway, and went
> with a prepare phase that only validates and checks for device
> resources, but skip system resources.
>
> It's not impossible, but my little Spring Cleanup patch is going to
> turn into Spring Renovation patch.
I'm sorry if implementing this properly is not easy.
You'll thank me later for forcing you to do this properly, I promise.
:-)
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists