improve bsg device allocation