Hi again David/Didier, > Can I suggest to do an RTE_MAX between (internal_config.memory - > total_mem) and (internal_config.memory * cpu_per_socket[socket_id] + > rte_lcore_count() - 1) / rte_lcore_count() ? I don't think it's a good idea > to go > over the requested amount. Let the last core have a chance of reserving > slightly less memory than other cores, but don't let it go over the limit. If > specific memory constraints are required, let the user use --socket-mem > instead.
Sorry for spamming, but now that I think of it, I don't believe this change makes much sense. If the user wants memory on specific sockets, there's already --socket-mem option. If the user doesn't care, there's -m option, which gives the user memory from whatever sockets it is available. With this change applied, DPDK will fail when run with -m switch under certain circumstances (e.g. cores from socket 0 present in the coremask but no memory left on socket 0), which is quite the opposite of a simple "give me n megs, I don't care where it comes from" option -m is providing. Best regards, Anatoly Burakov DPDK SW Engineer -------------------------------------------------------------- Intel Shannon Limited Registered in Ireland Registered Office: Collinstown Industrial Park, Leixlip, County Kildare Registered Number: 308263 Business address: Dromore House, East Park, Shannon, Co. Clare