On Wed, Sep 19, 2018 at 4:15 AM Jerry Lee <leisurelysw24@xxxxxxxxx> wrote: > > Hi, > > I got the following BUG_ON() trace when there is high memory pressure > on a system. I'm curious whether it's kind of aggressive to trigger a > BUG() when a memory allocation failure is encountered? Is it suitable > to change the behaviour to propagate a -ENOMEM back to the caller or > to retry allocation several times? Any ideas and feedback are > appreciated, thanks! Hi Jerry, We can't really handle an error from ceph_msg_data_create(), so returning it to the caller won't work. It ends up being called from send_request(), which is a void function for a very good reason. I don't think we should be attempting to allocate ceph_msg_data in ceph_msg_data_create() at all. There is usually only a couple of data items in any given message, so it should be possible to embed them in ceph_msg. Let me see if I can come up with a patch in the next few days. Thanks, Ilya